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: trunk/Source/bindings/v8/V8Initializer.cpp

Issue 218813002: Revert 170357 "Revert of Make DOMWrapperWorld::current() return ..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 9 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 | « trunk/Source/bindings/v8/V8ErrorHandler.cpp ('k') | trunk/Source/bindings/v8/V8MutationCallback.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/bindings/v8/V8Initializer.cpp
===================================================================
--- trunk/Source/bindings/v8/V8Initializer.cpp (revision 170423)
+++ trunk/Source/bindings/v8/V8Initializer.cpp (working copy)
@@ -111,8 +111,8 @@
String resource = shouldUseDocumentURL ? enteredWindow->document()->url() : toCoreString(resourceName.As<v8::String>());
AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCrossOrigin : NotSharableCrossOrigin;
- DOMWrapperWorld* world = DOMWrapperWorld::current(isolate);
- RefPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, resource, message->GetLineNumber(), message->GetStartColumn() + 1, world);
+ DOMWrapperWorld& world = DOMWrapperWorld::current(isolate);
+ RefPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, resource, message->GetLineNumber(), message->GetStartColumn() + 1, &world);
if (V8DOMWrapper::isDOMWrapper(data)) {
v8::Handle<v8::Object> obj = v8::Handle<v8::Object>::Cast(data);
const WrapperTypeInfo* type = toWrapperTypeInfo(obj);
@@ -127,7 +127,7 @@
// avoid storing the exception object, as we can't create a wrapper during context creation.
// FIXME: Can we even get here during initialization now that we bail out when GetEntered returns an empty handle?
LocalFrame* frame = enteredWindow->document()->frame();
- if (world && frame && frame->script().existingWindowShell(world))
+ if (frame && frame->script().existingWindowShell(world))
V8ErrorHandler::storeExceptionOnErrorEventWrapper(event.get(), data, v8::Isolate::GetCurrent());
enteredWindow->document()->reportException(event.release(), callStack, corsStatus);
}
@@ -219,7 +219,7 @@
String errorMessage = toCoreString(message->Get());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, sourceURL, message->GetScriptResourceName());
- RefPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, sourceURL, message->GetLineNumber(), message->GetStartColumn() + 1, DOMWrapperWorld::current(isolate));
+ RefPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, sourceURL, message->GetLineNumber(), message->GetStartColumn() + 1, &DOMWrapperWorld::current(isolate));
AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? SharableCrossOrigin : NotSharableCrossOrigin;
V8ErrorHandler::storeExceptionOnErrorEventWrapper(event.get(), data, isolate);
« no previous file with comments | « trunk/Source/bindings/v8/V8ErrorHandler.cpp ('k') | trunk/Source/bindings/v8/V8MutationCallback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698