Chromium Code Reviews
DescriptionUse mayNotBeMainThread for wrapper optimization
DOMDataStore has overloaded methods (for Node*) that checks if we're in a main world by checking if isolated worlds exist, and returns a main world wrapper directly if they don't exist. Node is used because it can never be created in a worker world.
This patch changes the main world check to checking if we're on the main thread (using mayNotBeMainThread) and if any non-main worlds have been created on the main thread (If there are no non-main worlds, we have to be in the main world). This way, we don't need Node.
BUG=682322
Review-Url: https://codereview.chromium.org/2726593002
Cr-Commit-Position: refs/heads/master@{#455530}
Committed: https://chromium.googlesource.com/chromium/src/+/199953cd647ec50f5f07d9025e5a8ba6948f8079
Patch Set 1 #
Total comments: 1
Patch Set 2 : Use thread safe counter #
Total comments: 1
Patch Set 3 : Use boolean that is set in main thread #Patch Set 4 : Minor changes #
Total comments: 4
Patch Set 5 : Use mayNotBeMainThread to do fast path check #Patch Set 6 : Rebase, fix tests #
Total comments: 6
Patch Set 7 : Renaming + move decrement to destructor #
Total comments: 6
Patch Set 8 : Use V8TestingScope #Messages
Total messages: 37 (19 generated)
|