cef/patch/patches/webcore_v8_custom.patch

18 lines
706 B
Diff
Raw Normal View History

Index: V8DOMWindowCustom.cpp
===================================================================
--- V8DOMWindowCustom.cpp (revision 100508)
+++ V8DOMWindowCustom.cpp (working copy)
@@ -291,8 +291,11 @@
static v8::Handle<v8::Value> handlePostMessageCallback(const v8::Arguments& args, bool doTransfer)
{
DOMWindow* window = V8DOMWindow::toNative(args.Holder());
+ Frame* frame = V8Proxy::retrieveFrameForCallingContext();
+ if (!frame)
+ return v8::Undefined();
- DOMWindow* source = V8Proxy::retrieveFrameForCallingContext()->domWindow();
+ DOMWindow* source = frame->domWindow();
ASSERT(source->frame());
// This function has variable arguments and can either be: