| Index: Source/bindings/v8/V8Initializer.cpp
|
| diff --git a/Source/bindings/v8/V8Initializer.cpp b/Source/bindings/v8/V8Initializer.cpp
|
| index ed0edf1f51c7e0dc5a4926ffb171b390d884ed60..98dce3b8fc1fd36669dcce3b4cae9029b16d528b 100644
|
| --- a/Source/bindings/v8/V8Initializer.cpp
|
| +++ b/Source/bindings/v8/V8Initializer.cpp
|
| @@ -85,6 +85,13 @@ static void reportFatalErrorInMainThread(const char* location, const char* messa
|
|
|
| static void messageHandlerInMainThread(v8::Handle<v8::Message> message, v8::Handle<v8::Value> data)
|
| {
|
| + ASSERT(isMainThread());
|
| + // It's possible that messageHandlerInMainThread() is invoked while we're initializing a window.
|
| + // In that half-baked situation, we don't have a valid context nor a valid world,
|
| + // so just return immediately.
|
| + if (DOMWrapperWorld::windowIsBeingInitialized())
|
| + return;
|
| +
|
| v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
| // If called during context initialization, there will be no entered window.
|
| DOMWindow* enteredWindow = enteredDOMWindow(isolate);
|
|
|