[V8] ScriptRunner::runCompiledScript() should return Handle<Value>() when OOM occurs
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Feb 2013 23:01:20 +0000 (23:01 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Feb 2013 23:01:20 +0000 (23:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=110254

Patch by Kentaro Hara <haraken@google.com> on 2013-02-19
Reviewed by Adam Barth.

Chromium bug: https://code.google.com/p/chromium/issues/detail?id=176951

Currently ScriptRunner::runCompiledScript() calls
ASSERT(script.IsEmpty()) when OOM occurs. The Chromium bug is
hitting the ASSERT(). The ASSERT() does not make sense at all.
Instead, we should return an empty handle when OOM occurs.

No tests. The bug happens only when OOM occurs.

* bindings/v8/ScriptRunner.cpp:
(WebCore::ScriptRunner::runCompiledScript):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@143387 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bindings/v8/ScriptRunner.cpp

index 5125e871de0f6a0051a3ddbdb3a8d393c3a28b53..ad1ed33c557b9788b6e5885cf9f79333825782b8 100644 (file)
@@ -1,3 +1,22 @@
+2013-02-19  Kentaro Hara  <haraken@google.com>
+
+        [V8] ScriptRunner::runCompiledScript() should return Handle<Value>() when OOM occurs
+        https://bugs.webkit.org/show_bug.cgi?id=110254
+
+        Reviewed by Adam Barth.
+
+        Chromium bug: https://code.google.com/p/chromium/issues/detail?id=176951
+
+        Currently ScriptRunner::runCompiledScript() calls
+        ASSERT(script.IsEmpty()) when OOM occurs. The Chromium bug is
+        hitting the ASSERT(). The ASSERT() does not make sense at all.
+        Instead, we should return an empty handle when OOM occurs.
+
+        No tests. The bug happens only when OOM occurs.
+
+        * bindings/v8/ScriptRunner.cpp:
+        (WebCore::ScriptRunner::runCompiledScript):
+
 2013-02-19  Elliott Sprehn  <esprehn@chromium.org>
 
         Support both MutationObserver and WebKitMutationObserver
index b453baa0b45ca3afc2f2479923be204a03e6321f..234fc0a66e1e02adbc21a42e12840846ebd0f66f 100644 (file)
@@ -43,7 +43,7 @@ v8::Local<v8::Value> ScriptRunner::runCompiledScript(v8::Handle<v8::Script> scri
         return handleMaxRecursionDepthExceeded();
 
     if (handleOutOfMemory())
-        ASSERT(script.IsEmpty());
+        return v8::Local<v8::Value>();
 
     // Run the script and keep track of the current recursion depth.
     v8::Local<v8::Value> result;