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

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

Issue 2679933003: Avoid setting CustomEvent.detail property in initCustomEvent while dispatch an event. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/LayoutTests/external/wpt/dom/events/Event-init-while-dispatching-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6f10be994a901f249eec7be1640217eeef29b699..17470c13528163884e355ec273b9efef66e40d1a 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp
@@ -107,6 +107,8 @@ 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(),
« no previous file with comments | « third_party/WebKit/LayoutTests/external/wpt/dom/events/Event-init-while-dispatching-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698