ASSERT(context);
v8::Isolate* isolate = toIsolate(context);
ASSERT(isolate->InContext());
- v8::Handle<v8::Context> v8Context = toV8Context(context, DOMWrapperWorld::current());
+ v8::Handle<v8::Context> v8Context = toV8Context(context, DOMWrapperWorld::current(isolate));
v8::Handle<v8::Object> creationContext = v8Context.IsEmpty() ? v8::Object::New(isolate) : v8Context->Global();
v8::Handle<v8::Object> promise = V8PromiseCustom::createPromise(creationContext, isolate);
return ScriptPromise(promise, isolate);