Title: [164897] trunk/Source/WebCore
- Revision
- 164897
- Author
- [email protected]
- Date
- 2014-02-28 16:45:21 -0800 (Fri, 28 Feb 2014)
Log Message
JSC Assertion failure every time I start Safari (r164846)
https://bugs.webkit.org/show_bug.cgi?id=129510
Reviewed by Mark Hahnenberg.
Take the lock before allocating objects because afterward is too late.
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::windowScriptNPObject):
(WebCore::ScriptController::jsObjectForPluginElement):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (164896 => 164897)
--- trunk/Source/WebCore/ChangeLog 2014-03-01 00:42:29 UTC (rev 164896)
+++ trunk/Source/WebCore/ChangeLog 2014-03-01 00:45:21 UTC (rev 164897)
@@ -1,3 +1,17 @@
+2014-02-28 Geoffrey Garen <[email protected]>
+
+ JSC Assertion failure every time I start Safari (r164846)
+ https://bugs.webkit.org/show_bug.cgi?id=129510
+
+ Reviewed by Mark Hahnenberg.
+
+ Take the lock before allocating objects because afterward is too late.
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluateInWorld):
+ (WebCore::ScriptController::windowScriptNPObject):
+ (WebCore::ScriptController::jsObjectForPluginElement):
+
2014-02-28 Joseph Pecoraro <[email protected]>
Web Inspector: ASSERT in WebCore::JSDOMWindowBase::supportsRichSourceInfo inspecting iOS
Modified: trunk/Source/WebCore/bindings/js/ScriptController.cpp (164896 => 164897)
--- trunk/Source/WebCore/bindings/js/ScriptController.cpp 2014-03-01 00:42:29 UTC (rev 164896)
+++ trunk/Source/WebCore/bindings/js/ScriptController.cpp 2014-03-01 00:45:21 UTC (rev 164897)
@@ -121,6 +121,8 @@
Deprecated::ScriptValue ScriptController::evaluateInWorld(const ScriptSourceCode& sourceCode, DOMWrapperWorld& world)
{
+ JSLockHolder lock(JSDOMWindowBase::commonVM());
+
const SourceCode& jsSourceCode = sourceCode.jsSourceCode();
String sourceURL = jsSourceCode.provider()->url();
@@ -136,8 +138,6 @@
const String* savedSourceURL = m_sourceURL;
m_sourceURL = &sourceURL;
- JSLockHolder lock(exec);
-
Ref<Frame> protect(m_frame);
InspectorInstrumentationCookie cookie = InspectorInstrumentation::willEvaluateScript(&m_frame, sourceURL, sourceCode.startLine());
@@ -349,12 +349,12 @@
NPObject* ScriptController::windowScriptNPObject()
{
if (!m_windowScriptNPObject) {
+ JSLockHolder lock(JSDOMWindowBase::commonVM());
if (canExecuteScripts(NotAboutToExecuteScript)) {
// _javascript_ is enabled, so there is a _javascript_ window object.
// Return an NPObject bound to the window object.
JSDOMWindow* win = windowShell(pluginWorld())->window();
ASSERT(win);
- JSC::JSLockHolder lock(win->globalExec());
Bindings::RootObject* root = bindingRootObject();
m_windowScriptNPObject = _NPN_CreateScriptObject(0, win, root);
} else {
@@ -395,9 +395,10 @@
if (!canExecuteScripts(NotAboutToExecuteScript))
return 0;
+ JSLockHolder lock(JSDOMWindowBase::commonVM());
+
// Create a JSObject bound to this element
JSDOMWindow* globalObj = globalObject(pluginWorld());
- JSLockHolder lock(globalObj->globalExec());
// FIXME: is normal okay? - used for NP plugins?
JSValue jsElementValue = toJS(globalObj->globalExec(), globalObj, plugin);
if (!jsElementValue || !jsElementValue.isObject())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes