Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Unified Diff: Source/bindings/scripts/code_generator_v8.pm

Issue 137953010: Remove isolatedWorldForEnteredContext() and isolatedWorldForIsolate() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8TestInterfaceDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/code_generator_v8.pm
diff --git a/Source/bindings/scripts/code_generator_v8.pm b/Source/bindings/scripts/code_generator_v8.pm
index 4cf55465b56d8a197a3b92c9ac842c80e7e32329..239b85acd62bbcea3927d3279fd2190a8adae665 100644
--- a/Source/bindings/scripts/code_generator_v8.pm
+++ b/Source/bindings/scripts/code_generator_v8.pm
@@ -3109,7 +3109,7 @@ END
# and thus passing it around would cause leakage.
# 2) Errors cannot be cloned (or serialized):
# http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#safe-passing-of-structured-data
- $implementation{nameSpaceInternal}->add(" if (isolatedWorldForIsolate(info.GetIsolate())) {\n");
+ $implementation{nameSpaceInternal}->add(" if (DOMWrapperWorld::current(info.GetIsolate())->isIsolatedWorld()) {\n");
foreach my $attrName (@anyAttributeNames) {
my $setter = "setSerialized" . FirstLetterToUpperCase($attrName);
$implementation{nameSpaceInternal}->add(<<END);
@@ -5138,9 +5138,10 @@ END
$code .= <<END;
if (wrapper.IsEmpty())
return wrapper;
- if (!isolatedWorldForEnteredContext(isolate)) {
+ DOMWrapperWorld* world = DOMWrapperWorld::current(isolate);
+ if (world->isMainWorld()) {
if (Frame* frame = impl->frame())
- frame->script().windowShell(DOMWrapperWorld::mainWorld())->updateDocumentWrapper(wrapper);
+ frame->script().windowShell(world)->updateDocumentWrapper(wrapper);
}
END
}
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8TestInterfaceDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698