Index: Source/bindings/v8/V8Initializer.cpp |
diff --git a/Source/bindings/v8/V8Initializer.cpp b/Source/bindings/v8/V8Initializer.cpp |
index 98dce3b8fc1fd36669dcce3b4cae9029b16d528b..1cd02627b1ad467f5ba56a3ce2f0429a1a2ec8c3 100644 |
--- a/Source/bindings/v8/V8Initializer.cpp |
+++ b/Source/bindings/v8/V8Initializer.cpp |
@@ -111,8 +111,8 @@ static void messageHandlerInMainThread(v8::Handle<v8::Message> message, v8::Hand |
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 @@ static void messageHandlerInMainThread(v8::Handle<v8::Message> message, v8::Hand |
// 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 @@ static void messageHandlerInWorker(v8::Handle<v8::Message> message, v8::Handle<v |
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); |