diff options
author | ager@chromium.org <ager@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-20 12:58:04 +0000 |
---|---|---|
committer | ager@chromium.org <ager@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-20 12:58:04 +0000 |
commit | de72f522fdce68d3cc5d248197710b8e4a6eae7b (patch) | |
tree | d0eb0dd9ab21a45a5cde99e64f3b310f31e6912f /webkit/port/bindings/v8 | |
parent | a9233d0fe48e115c20803388badaf2038036e4cb (diff) | |
download | chromium_src-de72f522fdce68d3cc5d248197710b8e4a6eae7b.zip chromium_src-de72f522fdce68d3cc5d248197710b8e4a6eae7b.tar.gz chromium_src-de72f522fdce68d3cc5d248197710b8e4a6eae7b.tar.bz2 |
Null check V8 proxy before clearing it in out of memory situations.
BUG=10693
Review URL: http://codereview.chromium.org/67298
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14026 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/bindings/v8')
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.cpp | 10 |
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); |