Title: [134508] trunk/Source/WebCore
- Revision
- 134508
- Author
- [email protected]
- Date
- 2012-11-13 16:59:44 -0800 (Tue, 13 Nov 2012)
Log Message
Make an assertion in JSEventListener::jsFunction() more useful.
https://bugs.webkit.org/show_bug.cgi?id=101985.
Reviewed by Geoffrey Garen.
The assertion was weakened in r134495. This strengthens it again.
No new tests.
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (134507 => 134508)
--- trunk/Source/WebCore/ChangeLog 2012-11-14 00:36:06 UTC (rev 134507)
+++ trunk/Source/WebCore/ChangeLog 2012-11-14 00:59:44 UTC (rev 134508)
@@ -1,3 +1,17 @@
+2012-11-13 Mark Lam <[email protected]>
+
+ Make an assertion in JSEventListener::jsFunction() more useful.
+ https://bugs.webkit.org/show_bug.cgi?id=101985.
+
+ Reviewed by Geoffrey Garen.
+
+ The assertion was weakened in r134495. This strengthens it again.
+
+ No new tests.
+
+ * bindings/js/JSEventListener.h:
+ (WebCore::JSEventListener::jsFunction):
+
2012-11-13 Dean Jackson <[email protected]>
Support list of tracks in caption media controls
Modified: trunk/Source/WebCore/bindings/js/JSEventListener.h (134507 => 134508)
--- trunk/Source/WebCore/bindings/js/JSEventListener.h 2012-11-14 00:36:06 UTC (rev 134507)
+++ trunk/Source/WebCore/bindings/js/JSEventListener.h 2012-11-14 00:59:44 UTC (rev 134508)
@@ -85,14 +85,15 @@
m_jsFunction.setMayBeNull(*scriptExecutionContext->globalData(), m_wrapper.get(), function);
}
+ // Verify that we have a valid wrapper protecting our function from
+ // garbage collection. That is except for when we're not in the normal
+ // world and can have zombie m_jsFunctions.
+ ASSERT(!m_isolatedWorld->isNormal() || m_wrapper || !m_jsFunction);
+
// If m_wrapper is 0, then jsFunction is zombied, and should never be accessed.
if (!m_wrapper)
return 0;
- // Verify that we have a valid wrapper protecting our function from
- // garbage collection.
- ASSERT(m_wrapper || !m_jsFunction);
-
// Try to verify that m_jsFunction wasn't recycled. (Not exact, since an
// event listener can be almost anything, but this makes test-writing easier).
ASSERT(!m_jsFunction || static_cast<JSC::JSCell*>(m_jsFunction.get())->isObject());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes