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

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

Issue 68563003: Create DOM exceptions in the correct context. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased onto df9a982fbe97 Created 7 years, 1 month 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/V8ThrowException.h ('k') | Source/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8ThrowException.cpp
diff --git a/Source/bindings/v8/V8ThrowException.cpp b/Source/bindings/v8/V8ThrowException.cpp
index 01715d02f8ea4c5b24f1e1a4c51f99ce2c57897b..ed31098e5588934aaedbabe726685187ac91222e 100644
--- a/Source/bindings/v8/V8ThrowException.cpp
+++ b/Source/bindings/v8/V8ThrowException.cpp
@@ -44,7 +44,7 @@ static void domExceptionStackSetter(v8::Local<v8::String> name, v8::Local<v8::Va
info.Data()->ToObject()->Set(v8::String::NewSymbol("stack"), value);
}
-v8::Handle<v8::Value> V8ThrowException::createDOMException(int ec, const String& sanitizedMessage, const String& unsanitizedMessage, v8::Isolate* isolate)
+v8::Handle<v8::Value> V8ThrowException::createDOMException(int ec, const String& sanitizedMessage, const String& unsanitizedMessage, const v8::Handle<v8::Object>& creationContext, v8::Isolate* isolate)
{
if (ec <= 0 || v8::V8::IsExecutionTerminating())
return v8Undefined();
@@ -56,7 +56,7 @@ v8::Handle<v8::Value> V8ThrowException::createDOMException(int ec, const String&
return V8ThrowException::createTypeError(sanitizedMessage, isolate);
RefPtr<DOMException> domException = DOMException::create(ec, sanitizedMessage, unsanitizedMessage);
- v8::Handle<v8::Value> exception = toV8(domException, v8::Handle<v8::Object>(), isolate);
+ v8::Handle<v8::Value> exception = toV8(domException, creationContext, isolate);
if (exception.IsEmpty())
return v8Undefined();
@@ -70,10 +70,10 @@ v8::Handle<v8::Value> V8ThrowException::createDOMException(int ec, const String&
return exception;
}
-v8::Handle<v8::Value> V8ThrowException::throwDOMException(int ec, const String& sanitizedMessage, const String& unsanitizedMessage, v8::Isolate* isolate)
+v8::Handle<v8::Value> V8ThrowException::throwDOMException(int ec, const String& sanitizedMessage, const String& unsanitizedMessage, const v8::Handle<v8::Object>& creationContext, v8::Isolate* isolate)
{
ASSERT(ec == SecurityError || unsanitizedMessage.isEmpty());
- v8::Handle<v8::Value> exception = createDOMException(ec, sanitizedMessage, unsanitizedMessage, isolate);
+ v8::Handle<v8::Value> exception = createDOMException(ec, sanitizedMessage, unsanitizedMessage, creationContext, isolate);
if (exception.IsEmpty())
return v8Undefined();
« no previous file with comments | « Source/bindings/v8/V8ThrowException.h ('k') | Source/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698