-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix JsBuiltIn initialization code to not read root property #4589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix JsBuiltIn initialization code to not read root property #4589
Conversation
lib/Common/Exceptions/Throw.cpp
Outdated
| void Throw::FatalJsBuiltInError() | ||
| { | ||
| AssertMsg(false, "Could not initialize JsBuiltIns!"); | ||
| ReportFatalException(NULL, E_UNEXPECTED, Fatal_JsReentrancy_Error, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this have its own error reason instead of just Fatal_JsReentrancy_Error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Fixed
0ffcee3 to
9ab43ed
Compare
9ab43ed to
2d9f012
Compare
|
Thanks for the review! |
Failing builtin init should be fail fast pass stackoverflow exception above
2d9f012 to
8521489
Compare
jackhorton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What caused this to happen? Should we be concerned about Intl code doing this?
| { | ||
| #if DBG | ||
| m_isJsBuiltInInitCode = false; | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this (and the similar instances below) could still be done in the initializer list?
|
The root property maybe overridden and when we inject the jsbuiltin init code, it may be use the overridden property. Same applies for Intl. I checked Intl, it doesn't load any root property other than the Intl object itself. |
|
@dotnet-bot test Ubuntu shared_ubuntu_linux_debug |
…d root property Merge pull request #4589 from meg-gupta:addCheckOnRootPropLd Also add assert so that in future we dont write js builtin code to access any root property Fixes OS#15467762
…to not read root property Merge pull request #4589 from meg-gupta:addCheckOnRootPropLd Also add assert so that in future we dont write js builtin code to access any root property Fixes OS#15467762
…ization code to not read root property Merge pull request #4589 from meg-gupta:addCheckOnRootPropLd Also add assert so that in future we dont write js builtin code to access any root property Fixes OS#15467762
Also add assert so that in future we dont write js builtin code to access any root property
Fixes OS#15467762