| Index: trunk/Source/bindings/v8/DOMWrapperWorld.cpp
|
| ===================================================================
|
| --- trunk/Source/bindings/v8/DOMWrapperWorld.cpp (revision 167359)
|
| +++ trunk/Source/bindings/v8/DOMWrapperWorld.cpp (working copy)
|
| @@ -62,10 +62,14 @@
|
|
|
| DOMWrapperWorld* DOMWrapperWorld::current(v8::Isolate* isolate)
|
| {
|
| + ASSERT(isolate->InContext());
|
| v8::Handle<v8::Context> context = isolate->GetCurrentContext();
|
| - if (context.IsEmpty() || !toDOMWindow(context))
|
| + if (!toDOMWindow(context))
|
| return 0;
|
| - return world(context);
|
| + ASSERT(isMainThread());
|
| + if (DOMWrapperWorld* world = isolatedWorld(context))
|
| + return world;
|
| + return mainWorld();
|
| }
|
|
|
| DOMWrapperWorld* DOMWrapperWorld::mainWorld()
|
|
|