This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chakrashim: fix some cross-context bugs
Change ContextShim::RegisterCrossContextObject() to use a finalizer instead of JsSetObjectBeforeCollectCallback. The later callback does not guarantee object collection. The object can be subsequently revived as a result of other objects being revived. When this happens we would clear the registered cross-context mapping info prematurely. Change UnwrapIfCrossContext() to use JsGetOwnPropertyDescriptor to read CrossContextTargetSymbol property. Original JsGetProperty could read from a prototype object and incorrectly unwraps the prototype object instead of the current object. Change MarshalObjectToContext() to re-enter correct fromContext when the object was cross-context and unwrapped. Change GetOwnPropertyDescriptorCallback() to return "undefined" instead of "false" for missing cases. Returning "false" is wrong. Reviewed-by: kunalspathak, curtisman
- Loading branch information
Jianchun Xu
committed
Jun 29, 2015
1 parent
93adbaa
commit 26ff29c
Showing
6 changed files
with
111 additions
and
50 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