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

Unified Diff: Source/core/dom/CustomEvent.h

Issue 17063016: Remove leak of objects between isolated worlds on custom events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed some test failures, fixed some nits, and generalized the new events test. Created 7 years, 6 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: Source/core/dom/CustomEvent.h
diff --git a/Source/core/dom/CustomEvent.h b/Source/core/dom/CustomEvent.h
index 6afc0ae12a2e08192039934f61fca4e48a8d4e3a..3b8131c90334564d158ad7b19378bd3a96156bbc 100644
--- a/Source/core/dom/CustomEvent.h
+++ b/Source/core/dom/CustomEvent.h
@@ -35,7 +35,7 @@ namespace WebCore {
struct CustomEventInit : public EventInit {
CustomEventInit();
- ScriptValue detail;
+ bool detailIsSet;
};
class CustomEvent : public Event {
@@ -52,20 +52,21 @@ public:
return adoptRef(new CustomEvent(type, initializer));
}
- void initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, const ScriptValue& detail);
void initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue>);
virtual const AtomicString& interfaceName() const;
- const ScriptValue& detail() const { return m_detail; }
PassRefPtr<SerializedScriptValue> serializedScriptValue() { return m_serializedScriptValue; }
+ bool isDetailSet() const { return m_detailIsSet; }
+
private:
CustomEvent();
CustomEvent(const AtomicString& type, const CustomEventInit& initializer);
- ScriptValue m_detail;
RefPtr<SerializedScriptValue> m_serializedScriptValue;
+
+ bool m_detailIsSet;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698