summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webkit/port/bindings/v8/v8_proxy.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp
index bee868a..91aad7b 100644
--- a/webkit/port/bindings/v8/v8_proxy.cpp
+++ b/webkit/port/bindings/v8/v8_proxy.cpp
@@ -968,10 +968,12 @@ bool V8Proxy::HandleOutOfMemory()
Frame* frame = V8Proxy::retrieveFrame(context);
V8Proxy* proxy = V8Proxy::retrieve(frame);
- // Clean m_context, and event handlers.
- proxy->clearForClose();
- // Destroy the global object.
- proxy->DestroyGlobal();
+ if (proxy != NULL) {
+ // Clean m_context, and event handlers.
+ proxy->clearForClose();
+ // Destroy the global object.
+ proxy->DestroyGlobal();
+ }
ChromiumBridge::notifyJSOutOfMemory(frame);