| Index: Source/bindings/core/v8/custom/V8WindowCustom.cpp
|
| diff --git a/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/Source/bindings/core/v8/custom/V8WindowCustom.cpp
|
| index a3d11523f1fdbaa186e50ce606ff4d7fc311b316..843f1dd05333245a94d6896667cca58be47006ca 100644
|
| --- a/Source/bindings/core/v8/custom/V8WindowCustom.cpp
|
| +++ b/Source/bindings/core/v8/custom/V8WindowCustom.cpp
|
| @@ -157,7 +157,13 @@ void V8Window::eventAttributeGetterCustom(const v8::PropertyCallbackInfo<v8::Val
|
| return;
|
| }
|
|
|
| - v8::Handle<v8::Value> jsEvent = V8HiddenValue::getHiddenValue(info.GetIsolate(), info.Holder()->CreationContext()->Global(), V8HiddenValue::event(info.GetIsolate()));
|
| + ASSERT(frame);
|
| + // This is a fast path to retrieve info.Holder()->CreationContext().
|
| + v8::Local<v8::Context> context = toV8Context(frame, DOMWrapperWorld::current(info.GetIsolate()));
|
| + if (context.IsEmpty())
|
| + return;
|
| +
|
| + v8::Handle<v8::Value> jsEvent = V8HiddenValue::getHiddenValue(info.GetIsolate(), context->Global(), V8HiddenValue::event(info.GetIsolate()));
|
| if (jsEvent.IsEmpty())
|
| return;
|
| v8SetReturnValue(info, jsEvent);
|
| @@ -172,7 +178,13 @@ void V8Window::eventAttributeSetterCustom(v8::Local<v8::Value> value, const v8::
|
| return;
|
| }
|
|
|
| - V8HiddenValue::setHiddenValue(info.GetIsolate(), info.Holder()->CreationContext()->Global(), V8HiddenValue::event(info.GetIsolate()), value);
|
| + ASSERT(frame);
|
| + // This is a fast path to retrieve info.Holder()->CreationContext().
|
| + v8::Local<v8::Context> context = toV8Context(frame, DOMWrapperWorld::current(info.GetIsolate()));
|
| + if (context.IsEmpty())
|
| + return;
|
| +
|
| + V8HiddenValue::setHiddenValue(info.GetIsolate(), context->Global(), V8HiddenValue::event(info.GetIsolate()), value);
|
| }
|
|
|
| void V8Window::frameElementAttributeGetterCustom(const v8::PropertyCallbackInfo<v8::Value>& info)
|
|
|