Index: Source/WebCore/bindings/v8/V8Proxy.cpp |
=================================================================== |
--- Source/WebCore/bindings/v8/V8Proxy.cpp (revision 76935) |
+++ Source/WebCore/bindings/v8/V8Proxy.cpp (working copy) |
@@ -153,10 +153,15 @@ |
return; |
Frame* source = V8Proxy::retrieveFrameForEnteredContext(); |
- if (!source || !source->document()) |
- return; // Ignore error if the source document is gone. |
+ if (!source) |
+ return; |
+ Page* page = source->page(); |
+ if (!page) |
+ return; |
Document* sourceDocument = source->document(); |
+ if (!sourceDocument) |
+ return; // Ignore error if the source document is gone. |
// FIXME: This error message should contain more specifics of why the same |
// origin check has failed. |
@@ -170,7 +175,7 @@ |
// NOTE: Safari prints the message in the target page, but it seems like |
// it should be in the source page. Even for delayed messages, we put it in |
// the source page. |
- addMessageToConsole(source->page(), str, kSourceID, kLineNumber); |
+ addMessageToConsole(page, str, kSourceID, kLineNumber); |
} |
static void handleFatalErrorInV8() |