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

Unified Diff: Source/bindings/v8/ExceptionState.h

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/CustomElementConstructorBuilder.cpp ('k') | Source/bindings/v8/ExceptionState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ExceptionState.h
diff --git a/Source/bindings/v8/ExceptionState.h b/Source/bindings/v8/ExceptionState.h
index d83b77d4af87e19a4ca2d4075fe62dd47ad14c4e..576d370ee2553c3176ddb9e58bb33964d484633f 100644
--- a/Source/bindings/v8/ExceptionState.h
+++ b/Source/bindings/v8/ExceptionState.h
@@ -44,11 +44,12 @@ typedef int ExceptionCode;
class ExceptionState {
WTF_MAKE_NONCOPYABLE(ExceptionState);
public:
- explicit ExceptionState(v8::Isolate* isolate)
+ explicit ExceptionState(const v8::Handle<v8::Object>& creationContext, v8::Isolate* isolate)
: m_code(0)
+ , m_creationContext(creationContext)
, m_isolate(isolate) { }
- virtual void throwDOMException(const ExceptionCode&, const String& message);
+ virtual void throwDOMException(const ExceptionCode&, const String& message);
virtual void throwTypeError(const String& message);
virtual void throwSecurityError(const String& sanitizedMessage, const String& unsanitizedMessage = String());
@@ -80,12 +81,13 @@ private:
void setException(v8::Handle<v8::Value>);
ScopedPersistent<v8::Value> m_exception;
+ v8::Handle<v8::Object> m_creationContext;
v8::Isolate* m_isolate;
};
class TrackExceptionState : public ExceptionState {
public:
- TrackExceptionState(): ExceptionState(0) { }
+ TrackExceptionState(): ExceptionState(v8::Handle<v8::Object>(), 0) { }
virtual void throwDOMException(const ExceptionCode&, const String& message) OVERRIDE FINAL;
virtual void throwTypeError(const String& message = String()) OVERRIDE FINAL;
virtual void throwSecurityError(const String& sanitizedMessage, const String& unsanitizedMessage = String()) OVERRIDE FINAL;
« no previous file with comments | « Source/bindings/v8/CustomElementConstructorBuilder.cpp ('k') | Source/bindings/v8/ExceptionState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698