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

Unified Diff: Source/bindings/v8/custom/V8WindowCustom.cpp

Issue 68563003: Create DOM exceptions in the correct context. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/bindings/v8/custom/V8WindowCustom.cpp
diff --git a/Source/bindings/v8/custom/V8WindowCustom.cpp b/Source/bindings/v8/custom/V8WindowCustom.cpp
index 91a8eccd45b60283f53c468c470e9fae7b8fe895..72eac7536c46cfc07d9b92128e99d4988165dcdf 100644
--- a/Source/bindings/v8/custom/V8WindowCustom.cpp
+++ b/Source/bindings/v8/custom/V8WindowCustom.cpp
@@ -160,7 +160,7 @@ void V8Window::eventAttributeGetterCustom(const v8::PropertyCallbackInfo<v8::Val
return;
Frame* frame = V8Window::toNative(holder)->frame();
- ExceptionState es(info.GetIsolate());
+ ExceptionState es(info.Holder(), info.GetIsolate());
if (!BindingSecurity::shouldAllowAccessToFrame(frame, es)) {
es.throwIfNeeded();
return;
@@ -185,7 +185,7 @@ void V8Window::eventAttributeSetterCustom(v8::Local<v8::Value> value, const v8::
return;
Frame* frame = V8Window::toNative(holder)->frame();
- ExceptionState es(info.GetIsolate());
+ ExceptionState es(info.Holder(), info.GetIsolate());
if (!BindingSecurity::shouldAllowAccessToFrame(frame, es)) {
es.throwIfNeeded();
return;
@@ -203,7 +203,7 @@ void V8Window::eventAttributeSetterCustom(v8::Local<v8::Value> value, const v8::
void V8Window::openerAttributeSetterCustom(v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
DOMWindow* imp = V8Window::toNative(info.Holder());
- ExceptionState es(info.GetIsolate());
+ ExceptionState es(info.Holder(), info.GetIsolate());
if (!BindingSecurity::shouldAllowAccessToFrame(imp->frame(), es)) {
es.throwIfNeeded();
return;
@@ -277,7 +277,7 @@ void V8Window::postMessageMethodCustom(const v8::FunctionCallbackInfo<v8::Value>
if (didThrow)
return;
- ExceptionState es(info.GetIsolate());
+ ExceptionState es(info.Holder(), info.GetIsolate());
window->postMessage(message.release(), &portArray, targetOrigin, source, es);
es.throwIfNeeded();
}
@@ -341,7 +341,7 @@ static void setUpDialog(DOMWindow* dialog, void* handler)
void V8Window::showModalDialogMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
DOMWindow* impl = V8Window::toNative(info.Holder());
- ExceptionState es(info.GetIsolate());
+ ExceptionState es(info.Holder(), info.GetIsolate());
if (!BindingSecurity::shouldAllowAccessToFrame(impl->frame(), es)) {
es.throwIfNeeded();
return;
@@ -360,7 +360,7 @@ void V8Window::showModalDialogMethodCustom(const v8::FunctionCallbackInfo<v8::Va
void V8Window::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
DOMWindow* impl = V8Window::toNative(info.Holder());
- ExceptionState es(info.GetIsolate());
+ ExceptionState es(info.Holder(), info.GetIsolate());
if (!BindingSecurity::shouldAllowAccessToFrame(impl->frame(), es)) {
es.throwIfNeeded();
return;
@@ -423,7 +423,7 @@ void V8Window::namedPropertyGetterCustom(v8::Local<v8::String> name, const v8::P
void V8Window::setTimeoutMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ExceptionState es(info.GetIsolate());
+ ExceptionState es(info.Holder(), info.GetIsolate());
WindowSetTimeoutImpl(info, true, es);
es.throwIfNeeded();
}
@@ -431,7 +431,7 @@ void V8Window::setTimeoutMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
void V8Window::setIntervalMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ExceptionState es(info.GetIsolate());
+ ExceptionState es(info.Holder(), info.GetIsolate());
WindowSetTimeoutImpl(info, false, es);
es.throwIfNeeded();
}

Powered by Google App Engine
This is Rietveld 408576698