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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp

Issue 2754713002: Make CustomEvent#initCustomEvent match the spec (Closed)
Patch Set: Codereview: nit Update tests expect after rebase Created 3 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
Index: third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp
index 285eb9f56458a99d4c569b069470432e35d20ddd..3931195bc0e5f2d2099732e922e1d3b5fdd5d63a 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp
@@ -106,13 +106,15 @@ void V8CustomEvent::constructorCustom(
void V8CustomEvent::initCustomEventMethodEpilogueCustom(
const v8::FunctionCallbackInfo<v8::Value>& info,
CustomEvent* impl) {
- ASSERT(info.Length() >= 3);
if (impl->isBeingDispatched())
return;
- v8::Local<v8::Value> detail = info[3];
- if (!detail.IsEmpty())
- storeDetail(ScriptState::current(info.GetIsolate()), impl, info.Holder(),
- detail);
+ if (info.Length() >= 4) {
+ v8::Local<v8::Value> detail = info[3];
+ if (!detail.IsEmpty()) {
+ storeDetail(ScriptState::current(info.GetIsolate()), impl, info.Holder(),
+ detail);
+ }
+ }
}
void V8CustomEvent::detailAttributeGetterCustom(

Powered by Google App Engine
This is Rietveld 408576698