Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: Source/bindings/v8/V8Binding.cpp

Issue 181843003: Don't ignore OOM exceptions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/V8AbstractEventListener.cpp ('k') | Source/bindings/v8/V8Initializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8Binding.cpp
diff --git a/Source/bindings/v8/V8Binding.cpp b/Source/bindings/v8/V8Binding.cpp
index dbb1a8ddb39ac100822cdad8a8be5b05e25781e1..11534f6acad0214db4e5930c4e7015cf130f6bfd 100644
--- a/Source/bindings/v8/V8Binding.cpp
+++ b/Source/bindings/v8/V8Binding.cpp
@@ -49,7 +49,6 @@
#include "core/dom/QualifiedName.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
-#include "core/frame/UseCounter.h"
#include "core/inspector/BindingVisitors.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
@@ -574,28 +573,6 @@ v8::Local<v8::Context> toV8Context(v8::Isolate* isolate, LocalFrame* frame, DOMW
return frame == attachedFrame ? context : v8::Local<v8::Context>();
}
-bool handleOutOfMemory()
-{
- v8::Local<v8::Context> context = v8::Isolate::GetCurrent()->GetCurrentContext();
-
- if (!context->HasOutOfMemoryException())
- return false;
-
- // Warning, error, disable JS for this frame?
- LocalFrame* frame = toFrameIfNotDetached(context);
- if (!frame)
- return true;
-
- frame->script().clearForOutOfMemory();
- frame->loader().client()->didExhaustMemoryAvailableForScript();
- UseCounter::count(frame->document(), UseCounter::JavascriptExhaustedMemory);
-
- if (Settings* settings = frame->settings())
- settings->setScriptEnabled(false);
-
- return true;
-}
-
v8::Local<v8::Value> handleMaxRecursionDepthExceeded(v8::Isolate* isolate)
{
throwError(v8RangeError, "Maximum call stack size exceeded.", isolate);
« no previous file with comments | « Source/bindings/v8/V8AbstractEventListener.cpp ('k') | Source/bindings/v8/V8Initializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698