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

Unified Diff: Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.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/V8HTMLOptionsCollectionCustom.cpp
diff --git a/Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp b/Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
index 25e85aa500ddca02825abf3a2f4f019071f982d2..289db90dff4e9d1653a13aa26c77706bebb3385f 100644
--- a/Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
+++ b/Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
@@ -80,7 +80,7 @@ void V8HTMLOptionsCollection::addMethodCustom(const v8::FunctionCallbackInfo<v8:
HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(info.Holder());
HTMLOptionElement* option = V8HTMLOptionElement::toNative(v8::Handle<v8::Object>(v8::Handle<v8::Object>::Cast(info[0])));
- ExceptionState es(info.GetIsolate());
+ ExceptionState es(info.Holder(), info.GetIsolate());
if (info.Length() < 2)
imp->add(option, es);
else {
@@ -100,7 +100,7 @@ void V8HTMLOptionsCollection::lengthAttributeSetterCustom(v8::Local<v8::Value> v
HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(info.Holder());
double v = value->NumberValue();
unsigned newLength = 0;
- ExceptionState es(info.GetIsolate());
+ ExceptionState es(info.Holder(), info.GetIsolate());
if (!std::isnan(v) && !std::isinf(v)) {
if (v < 0.0)
es.throwDOMException(IndexSizeError, ExceptionMessages::failedToSet("length", "HTMLOptionsCollection", "The value provided (" + String::number(v) + ") is negative. Lengths must be greater than or equal to 0."));

Powered by Google App Engine
This is Rietveld 408576698