forked from facebook/hhvm
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: ObjectData's o_set family of functions all took a bool flag "forInit". The flag was used to bypass access checks, and was only used when initializing an ObjectData from hphpi, and from o_setArray. This meant that we were always passing in, and checking a mostly unused parameter. In addition, Object's o_set family didnt have the flag. code-gen didnt differentiate the two cases, and so in some cases was passing the class name as the "forInit" flag. Bizarrely, this mostly worked, because the class-name would be converted to true, and access would be allowed (which is usually the right thing to do in correct programs). With this diff, ObjectData's o_set family matches the Object o_set family, solving the correctness problem, and also reducing the call overhead by dropping a parameter. Test Plan: fast_tests slow_tests Reviewers: qigao, myang Reviewed By: myang CC: ps, mwilliams, myang, qigao Differential Revision: 346544
- Loading branch information
mwilliams
authored and
macvicar
committed
Nov 29, 2011
1 parent
7447c5f
commit f05b80f
Showing
6 changed files
with
62 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters