<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[199619] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/199619">199619</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2016-04-15 19:25:56 -0700 (Fri, 15 Apr 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Reduce use of Deprecated::ScriptXXX classes
https://bugs.webkit.org/show_bug.cgi?id=156632
Reviewed by Alex Christensen.
Source/JavaScriptCore:
* bindings/ScriptFunctionCall.cpp:
(Deprecated::ScriptCallArgumentHandler::appendArgument): Deleted version that takes a Deprecated::ScriptValue.
(Deprecated::ScriptFunctionCall::call): Changed to return a JSValue.
* bindings/ScriptFunctionCall.h: Updated for the above.
* bindings/ScriptValue.cpp:
(Inspector::jsToInspectorValue): Moved from Deprecated namespace to Inspector namespace. Later, we should
move this to another source file in the inspector directory.
(Inspector::toInspectorValue): Added.
(Deprecated::ScriptValue::toInspectorValue): Updated for change to underlying function.
* bindings/ScriptValue.h: Update for the above.
* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::evaluateOnCallFrame): Changed arguments and return values from
Deprecated::ScriptValue to JSC::JSValue.
(Inspector::InjectedScript::functionDetails): Ditto.
(Inspector::InjectedScript::wrapCallFrames): Ditto.
(Inspector::InjectedScript::wrapObject): Ditto.
(Inspector::InjectedScript::wrapTable): Ditto.
(Inspector::InjectedScript::previewValue): Ditto.
(Inspector::InjectedScript::setExceptionValue): Ditto.
(Inspector::InjectedScript::findObjectById): Ditto.
(Inspector::InjectedScript::inspectObject): Ditto.
* inspector/InjectedScript.h: Ditto.
* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::callFunctionWithEvalEnabled): Ditto.
(Inspector::InjectedScriptBase::makeCall): Ditto.
* inspector/InjectedScriptBase.h: Ditto.
* inspector/InjectedScriptModule.cpp:
(Inspector::InjectedScriptModule::ensureInjected): Ditto.
* inspector/ScriptDebugListener.h: Ditto.
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::evaluateBreakpointAction): Ditto.
(Inspector::ScriptDebugServer::dispatchDidPause): Ditto.
(Inspector::ScriptDebugServer::dispatchBreakpointActionProbe): Ditto.
(Inspector::ScriptDebugServer::exceptionOrCaughtValue): Ditto.
* inspector/ScriptDebugServer.h: Ditto.
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::buildExceptionPauseReason): Ditto.
(Inspector::InspectorDebuggerAgent::didPause): Ditto.
(Inspector::InspectorDebuggerAgent::breakpointActionProbe): Ditto.
(Inspector::InspectorDebuggerAgent::didContinue): Ditto.
(Inspector::InspectorDebuggerAgent::clearDebuggerBreakpointState): Ditto.
* inspector/agents/InspectorDebuggerAgent.h: Ditto.
* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::InspectorHeapAgent::getPreview): Ditto.
(Inspector::InspectorHeapAgent::getRemoteObject): Ditto.
Source/WebCore:
* Modules/mediastream/SDPProcessor.cpp: Removed unneeded include.
* bindings/js/JSCommandLineAPIHostCustom.cpp:
(WebCore::JSCommandLineAPIHost::inspectedObject): Use JSValue.
* bindings/js/JSCustomEventCustom.cpp:
(WebCore::JSCustomEvent::detail): Ditto.
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld): Ditto.
(WebCore::ScriptController::evaluate): Ditto.
(WebCore::ScriptController::executeScriptInWorld): Ditto.
(WebCore::ScriptController::executeScript): Ditto.
(WebCore::ScriptController::executeIfJavaScriptURL): Ditto.
* bindings/js/ScriptController.h: Ditto.
* bindings/js/ScriptGlobalObject.cpp: Removed unused overload of set,
and unused remove and folded handleException function into its one call site.
(WebCore::ScriptGlobalObject::set): Take references instead of pointers.
(WebCore::ScriptGlobalObject::get): Use JSObject instead of Deprecated::ScriptObject.
* bindings/js/ScriptGlobalObject.h: Updated for the above.
* dom/CustomEvent.cpp:
(WebCore::CustomEvent::initCustomEvent): Take JSValue and ExecState instead of
Deprecated::ScriptValue.
(WebCore::CustomEvent::trySerializeDetail): Take a reference instead of a pointer.
Also removed an unneeded null check.
* dom/CustomEvent.h: Use JSValue.
* dom/CustomEvent.idl: Updated for the above.
* html/HTMLMediaElement.cpp: Remove unneeded include.
* inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::InspectableObject::get): Take reference instead of
pointer and return JSValue.
* inspector/CommandLineAPIHost.h: Updated for the above.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setDocument): Use "document" instead of "doc".
(WebCore::InspectorDOMAgent::setAttributesAsText): Omit redundant class name.
(WebCore::InspectorDOMAgent::focusNode): Ditto. Pass reference instead of pointer.
(WebCore::InspectorDOMAgent::undo): Ditto.
(WebCore::InspectorDOMAgent::redo): Ditto.
(WebCore::InspectorDOMAgent::nodeForObjectId): Stop using Deprecated::ScriptValue.
(WebCore::InspectorDOMAgent::resolveNode): Ditto.
(WebCore::InspectorDOMAgent::scriptValueAsNode): Removed unneeded isObject check,
which is already done by JSNode::toWrapped. Use JSValue.
(WebCore::InspectorDOMAgent::nodeAsScriptValue): Use JSValue.
* inspector/InspectorDOMAgent.h: Updated for the above.
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::windowObjectCleared): Use references instead of
pointers and removed unneeded local.
(WebCore::InspectorFrontendClientLocal::evaluateAsBoolean): More of the same.
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::showContextMenu): Ditto.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::breakpointActionProbe): Updated to take
reference instead of pointer and JSValue instead of ScriptValue.
* inspector/InspectorTimelineAgent.h: Ditto.
* inspector/PageConsoleAgent.cpp: Ditto.
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::breakpointActionLog): Ditto.
* inspector/PageDebuggerAgent.h: Ditto.
Source/WebKit/mac:
* WebView/WebFrame.mm:
(-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Use references instead
of pointers.
(-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]): Updated
since return value is a JSValue.
* WebView/WebView.mm:
(-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
Source/WebKit/win:
* Plugins/PluginView.cpp:
(WebCore::PluginView::performRequest): Use JSValue.
* WebFrame.cpp:
(WebFrame::stringByEvaluatingJavaScriptInScriptWorld): Ditto.
* WebView.cpp:
(WebView::stringByEvaluatingJavaScriptFromString): Ditto.
Source/WebKit2:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performJavaScriptURLRequest): Use JSValue.
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::windowObjectCleared): Use references.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScriptInMainFrame): Use JSValue.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebindingsScriptFunctionCallcpp">trunk/Source/JavaScriptCore/bindings/ScriptFunctionCall.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebindingsScriptFunctionCallh">trunk/Source/JavaScriptCore/bindings/ScriptFunctionCall.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebindingsScriptValuecpp">trunk/Source/JavaScriptCore/bindings/ScriptValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebindingsScriptValueh">trunk/Source/JavaScriptCore/bindings/ScriptValue.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptcpp">trunk/Source/JavaScriptCore/inspector/InjectedScript.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScripth">trunk/Source/JavaScriptCore/inspector/InjectedScript.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptBasecpp">trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptBaseh">trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptModulecpp">trunk/Source/JavaScriptCore/inspector/InjectedScriptModule.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorScriptDebugListenerh">trunk/Source/JavaScriptCore/inspector/ScriptDebugListener.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorScriptDebugServercpp">trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorScriptDebugServerh">trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgenth">trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorHeapAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/InspectorHeapAgent.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsJSGlobalObjectDebuggerAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsJSGlobalObjectDebuggerAgenth">trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamSDPProcessorcpp">trunk/Source/WebCore/Modules/mediastream/SDPProcessor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCommandLineAPIHostCustomcpp">trunk/Source/WebCore/bindings/js/JSCommandLineAPIHostCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCustomEventCustomcpp">trunk/Source/WebCore/bindings/js/JSCustomEventCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptControllercpp">trunk/Source/WebCore/bindings/js/ScriptController.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptControllerh">trunk/Source/WebCore/bindings/js/ScriptController.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptGlobalObjectcpp">trunk/Source/WebCore/bindings/js/ScriptGlobalObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptGlobalObjecth">trunk/Source/WebCore/bindings/js/ScriptGlobalObject.h</a></li>
<li><a href="#trunkSourceWebCoredomCustomEventcpp">trunk/Source/WebCore/dom/CustomEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoredomCustomEventh">trunk/Source/WebCore/dom/CustomEvent.h</a></li>
<li><a href="#trunkSourceWebCoredomCustomEventidl">trunk/Source/WebCore/dom/CustomEvent.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorCommandLineAPIHostcpp">trunk/Source/WebCore/inspector/CommandLineAPIHost.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorCommandLineAPIHosth">trunk/Source/WebCore/inspector/CommandLineAPIHost.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMAgentcpp">trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMAgenth">trunk/Source/WebCore/inspector/InspectorDOMAgent.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorFrontendClientLocalcpp">trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorFrontendHostcpp">trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorTimelineAgentcpp">trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorTimelineAgenth">trunk/Source/WebCore/inspector/InspectorTimelineAgent.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorPageConsoleAgentcpp">trunk/Source/WebCore/inspector/PageConsoleAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorPageDebuggerAgentcpp">trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorPageDebuggerAgenth">trunk/Source/WebCore/inspector/PageDebuggerAgent.h</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFramemm">trunk/Source/WebKit/mac/WebView/WebFrame.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinPluginsPluginViewcpp">trunk/Source/WebKit/win/Plugins/PluginView.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebFramecpp">trunk/Source/WebKit/win/WebFrame.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPluginViewcpp">trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebInspectorUIcpp">trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -1,3 +1,58 @@
</span><ins>+2016-04-15 Darin Adler <darin@apple.com>
+
+ Reduce use of Deprecated::ScriptXXX classes
+ https://bugs.webkit.org/show_bug.cgi?id=156632
+
+ Reviewed by Alex Christensen.
+
+ * bindings/ScriptFunctionCall.cpp:
+ (Deprecated::ScriptCallArgumentHandler::appendArgument): Deleted version that takes a Deprecated::ScriptValue.
+ (Deprecated::ScriptFunctionCall::call): Changed to return a JSValue.
+ * bindings/ScriptFunctionCall.h: Updated for the above.
+
+ * bindings/ScriptValue.cpp:
+ (Inspector::jsToInspectorValue): Moved from Deprecated namespace to Inspector namespace. Later, we should
+ move this to another source file in the inspector directory.
+ (Inspector::toInspectorValue): Added.
+ (Deprecated::ScriptValue::toInspectorValue): Updated for change to underlying function.
+ * bindings/ScriptValue.h: Update for the above.
+
+ * inspector/InjectedScript.cpp:
+ (Inspector::InjectedScript::evaluateOnCallFrame): Changed arguments and return values from
+ Deprecated::ScriptValue to JSC::JSValue.
+ (Inspector::InjectedScript::functionDetails): Ditto.
+ (Inspector::InjectedScript::wrapCallFrames): Ditto.
+ (Inspector::InjectedScript::wrapObject): Ditto.
+ (Inspector::InjectedScript::wrapTable): Ditto.
+ (Inspector::InjectedScript::previewValue): Ditto.
+ (Inspector::InjectedScript::setExceptionValue): Ditto.
+ (Inspector::InjectedScript::findObjectById): Ditto.
+ (Inspector::InjectedScript::inspectObject): Ditto.
+ * inspector/InjectedScript.h: Ditto.
+ * inspector/InjectedScriptBase.cpp:
+ (Inspector::InjectedScriptBase::callFunctionWithEvalEnabled): Ditto.
+ (Inspector::InjectedScriptBase::makeCall): Ditto.
+ * inspector/InjectedScriptBase.h: Ditto.
+ * inspector/InjectedScriptModule.cpp:
+ (Inspector::InjectedScriptModule::ensureInjected): Ditto.
+ * inspector/ScriptDebugListener.h: Ditto.
+ * inspector/ScriptDebugServer.cpp:
+ (Inspector::ScriptDebugServer::evaluateBreakpointAction): Ditto.
+ (Inspector::ScriptDebugServer::dispatchDidPause): Ditto.
+ (Inspector::ScriptDebugServer::dispatchBreakpointActionProbe): Ditto.
+ (Inspector::ScriptDebugServer::exceptionOrCaughtValue): Ditto.
+ * inspector/ScriptDebugServer.h: Ditto.
+ * inspector/agents/InspectorDebuggerAgent.cpp:
+ (Inspector::InspectorDebuggerAgent::buildExceptionPauseReason): Ditto.
+ (Inspector::InspectorDebuggerAgent::didPause): Ditto.
+ (Inspector::InspectorDebuggerAgent::breakpointActionProbe): Ditto.
+ (Inspector::InspectorDebuggerAgent::didContinue): Ditto.
+ (Inspector::InspectorDebuggerAgent::clearDebuggerBreakpointState): Ditto.
+ * inspector/agents/InspectorDebuggerAgent.h: Ditto.
+ * inspector/agents/InspectorHeapAgent.cpp:
+ (Inspector::InspectorHeapAgent::getPreview): Ditto.
+ (Inspector::InspectorHeapAgent::getRemoteObject): Ditto.
+
</ins><span class="cx"> 2016-04-15 Keith Miller <keith_miller@apple.com>
</span><span class="cx">
</span><span class="cx"> Some JIT/DFG operations need NativeCallFrameTracers
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebindingsScriptFunctionCallcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bindings/ScriptFunctionCall.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bindings/ScriptFunctionCall.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/bindings/ScriptFunctionCall.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -50,11 +50,6 @@
</span><span class="cx"> m_arguments.append(argument.jsObject());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ScriptCallArgumentHandler::appendArgument(const Deprecated::ScriptValue& argument)
-{
- m_arguments.append(argument.jsValue());
-}
-
</del><span class="cx"> void ScriptCallArgumentHandler::appendArgument(const String& argument)
</span><span class="cx"> {
</span><span class="cx"> JSLockHolder lock(m_exec);
</span><span class="lines">@@ -115,7 +110,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue ScriptFunctionCall::call(bool& hadException)
</del><ins>+JSValue ScriptFunctionCall::call(bool& hadException)
</ins><span class="cx"> {
</span><span class="cx"> JSObject* thisObject = m_thisObject.jsObject();
</span><span class="cx">
</span><span class="lines">@@ -124,13 +119,13 @@
</span><span class="cx"> JSValue function = thisObject->get(m_exec, Identifier::fromString(m_exec, m_name));
</span><span class="cx"> if (m_exec->hadException()) {
</span><span class="cx"> hadException = true;
</span><del>- return Deprecated::ScriptValue();
</del><ins>+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CallData callData;
</span><span class="cx"> CallType callType = getCallData(function, callData);
</span><span class="cx"> if (callType == CallType::None)
</span><del>- return Deprecated::ScriptValue();
</del><ins>+ return { };
</ins><span class="cx">
</span><span class="cx"> JSValue result;
</span><span class="cx"> NakedPtr<Exception> exception;
</span><span class="lines">@@ -142,15 +137,15 @@
</span><span class="cx"> if (exception) {
</span><span class="cx"> // Do not treat a terminated execution exception as having an exception. Just treat it as an empty result.
</span><span class="cx"> hadException = !isTerminatedExecutionException(exception);
</span><del>- return Deprecated::ScriptValue();
</del><ins>+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return Deprecated::ScriptValue(m_exec->vm(), result);
</del><ins>+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue ScriptFunctionCall::call()
</del><ins>+JSC::JSValue ScriptFunctionCall::call()
</ins><span class="cx"> {
</span><del>- bool hadException = false;
</del><ins>+ bool hadException;
</ins><span class="cx"> return call(hadException);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebindingsScriptFunctionCallh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bindings/ScriptFunctionCall.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bindings/ScriptFunctionCall.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/bindings/ScriptFunctionCall.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -73,8 +73,8 @@
</span><span class="cx"> public:
</span><span class="cx"> typedef JSC::JSValue (*ScriptFunctionCallHandler)(JSC::ExecState* exec, JSC::JSValue functionObject, JSC::CallType callType, const JSC::CallData& callData, JSC::JSValue thisValue, const JSC::ArgList& args, NakedPtr<JSC::Exception>&);
</span><span class="cx"> ScriptFunctionCall(const ScriptObject& thisObject, const String& name, ScriptFunctionCallHandler handler = nullptr);
</span><del>- ScriptValue call(bool& hadException);
- ScriptValue call();
</del><ins>+ JSC::JSValue call(bool& hadException);
+ JSC::JSValue call();
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> ScriptFunctionCallHandler m_callHandler;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebindingsScriptValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bindings/ScriptValue.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bindings/ScriptValue.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/bindings/ScriptValue.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -38,6 +38,71 @@
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> using namespace Inspector;
</span><span class="cx">
</span><ins>+namespace Inspector {
+
+static RefPtr<InspectorValue> jsToInspectorValue(ExecState& scriptState, JSValue value, int maxDepth)
+{
+ if (!value) {
+ ASSERT_NOT_REACHED();
+ return nullptr;
+ }
+
+ if (!maxDepth)
+ return nullptr;
+
+ maxDepth--;
+
+ if (value.isUndefinedOrNull())
+ return InspectorValue::null(); // FIXME: Why is it OK to turn undefined into null?
+ if (value.isBoolean())
+ return InspectorValue::create(value.asBoolean());
+ if (value.isNumber() && value.isDouble())
+ return InspectorValue::create(value.asNumber());
+ if (value.isNumber() && value.isMachineInt())
+ return InspectorValue::create(static_cast<int>(value.asMachineInt()));
+ if (value.isString())
+ return InspectorValue::create(value.getString(&scriptState));
+
+ if (value.isObject()) {
+ if (isJSArray(value)) {
+ auto inspectorArray = InspectorArray::create();
+ auto& array = *asArray(value);
+ unsigned length = array.length();
+ for (unsigned i = 0; i < length; i++) {
+ auto elementValue = jsToInspectorValue(scriptState, array.getIndex(&scriptState, i), maxDepth);
+ if (!elementValue)
+ return nullptr;
+ inspectorArray->pushValue(WTFMove(elementValue));
+ }
+ return WTFMove(inspectorArray);
+ }
+ auto inspectorObject = InspectorObject::create();
+ auto& object = *value.getObject();
+ PropertyNameArray propertyNames(&scriptState, PropertyNameMode::Strings);
+ object.methodTable()->getOwnPropertyNames(&object, &scriptState, propertyNames, EnumerationMode());
+ for (auto& name : propertyNames) {
+ auto inspectorValue = jsToInspectorValue(scriptState, object.get(&scriptState, name), maxDepth);
+ if (!inspectorValue)
+ return nullptr;
+ inspectorObject->setValue(name.string(), WTFMove(inspectorValue));
+ }
+ return WTFMove(inspectorObject);
+ }
+
+ ASSERT_NOT_REACHED();
+ return nullptr;
+}
+
+RefPtr<InspectorValue> toInspectorValue(ExecState& state, JSValue value)
+{
+ // FIXME: Maybe we should move the JSLockHolder stuff to the callers since this function takes a JSValue directly.
+ // Doing the locking here made sense when we were trying to abstract the difference between multiple JavaScript engines.
+ JSLockHolder holder(&state);
+ return jsToInspectorValue(state, value, InspectorValue::maxDepth);
+}
+
+} // namespace Inspector
+
</ins><span class="cx"> namespace Deprecated {
</span><span class="cx">
</span><span class="cx"> ScriptValue::~ScriptValue()
</span><span class="lines">@@ -97,66 +162,10 @@
</span><span class="cx"> return getCallData(m_value.get(), callData) != CallType::None;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static RefPtr<InspectorValue> jsToInspectorValue(ExecState* scriptState, JSValue value, int maxDepth)
-{
- if (!value) {
- ASSERT_NOT_REACHED();
- return nullptr;
- }
-
- if (!maxDepth)
- return nullptr;
-
- maxDepth--;
-
- if (value.isNull() || value.isUndefined())
- return InspectorValue::null();
- if (value.isBoolean())
- return InspectorValue::create(value.asBoolean());
- if (value.isNumber() && value.isDouble())
- return InspectorValue::create(value.asNumber());
- if (value.isNumber() && value.isMachineInt())
- return InspectorValue::create(static_cast<int>(value.asMachineInt()));
- if (value.isString())
- return InspectorValue::create(value.getString(scriptState));
-
- if (value.isObject()) {
- if (isJSArray(value)) {
- Ref<InspectorArray> inspectorArray = InspectorArray::create();
- JSArray* array = asArray(value);
- unsigned length = array->length();
- for (unsigned i = 0; i < length; i++) {
- JSValue element = array->getIndex(scriptState, i);
- RefPtr<InspectorValue> elementValue = jsToInspectorValue(scriptState, element, maxDepth);
- if (!elementValue)
- return nullptr;
- inspectorArray->pushValue(WTFMove(elementValue));
- }
- return WTFMove(inspectorArray);
- }
- Ref<InspectorObject> inspectorObject = InspectorObject::create();
- JSObject* object = value.getObject();
- PropertyNameArray propertyNames(scriptState, PropertyNameMode::Strings);
- object->methodTable()->getOwnPropertyNames(object, scriptState, propertyNames, EnumerationMode());
- for (size_t i = 0; i < propertyNames.size(); i++) {
- const Identifier& name = propertyNames[i];
- JSValue propertyValue = object->get(scriptState, name);
- RefPtr<InspectorValue> inspectorValue = jsToInspectorValue(scriptState, propertyValue, maxDepth);
- if (!inspectorValue)
- return nullptr;
- inspectorObject->setValue(name.string(), WTFMove(inspectorValue));
- }
- return WTFMove(inspectorObject);
- }
-
- ASSERT_NOT_REACHED();
- return nullptr;
-}
-
</del><span class="cx"> RefPtr<InspectorValue> ScriptValue::toInspectorValue(ExecState* scriptState) const
</span><span class="cx"> {
</span><span class="cx"> JSLockHolder holder(scriptState);
</span><del>- return jsToInspectorValue(scriptState, m_value.get(), InspectorValue::maxDepth);
</del><ins>+ return jsToInspectorValue(*scriptState, m_value.get(), InspectorValue::maxDepth);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace Deprecated
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebindingsScriptValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bindings/ScriptValue.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bindings/ScriptValue.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/bindings/ScriptValue.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -37,11 +37,14 @@
</span><span class="cx"> #include "Operations.h"
</span><span class="cx"> #include "Strong.h"
</span><span class="cx"> #include "StrongInlines.h"
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> namespace Inspector {
</span><ins>+
</ins><span class="cx"> class InspectorValue;
</span><ins>+
+RefPtr<InspectorValue> toInspectorValue(JSC::ExecState&, JSC::JSValue);
+
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> namespace Deprecated {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScript.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScript.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScript.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx"> makeEvalCall(errorString, function, result, wasThrown);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InjectedScript::evaluateOnCallFrame(ErrorString& errorString, const Deprecated::ScriptValue& callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Inspector::Protocol::Runtime::RemoteObject>* result, Inspector::Protocol::OptOutput<bool>* wasThrown, Inspector::Protocol::OptOutput<int>* savedResultIndex)
</del><ins>+void InjectedScript::evaluateOnCallFrame(ErrorString& errorString, JSC::JSValue callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Inspector::Protocol::Runtime::RemoteObject>* result, Inspector::Protocol::OptOutput<bool>* wasThrown, Inspector::Protocol::OptOutput<int>* savedResultIndex)
</ins><span class="cx"> {
</span><span class="cx"> Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("evaluateOnCallFrame"), inspectorEnvironment()->functionCallHandler());
</span><span class="cx"> function.appendArgument(callFrames);
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx"> *result = BindingTraits<Inspector::Protocol::Debugger::FunctionDetails>::runtimeCast(WTFMove(resultValue));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InjectedScript::functionDetails(ErrorString& errorString, const Deprecated::ScriptValue& value, RefPtr<Protocol::Debugger::FunctionDetails>* result)
</del><ins>+void InjectedScript::functionDetails(ErrorString& errorString, JSC::JSValue value, RefPtr<Protocol::Debugger::FunctionDetails>* result)
</ins><span class="cx"> {
</span><span class="cx"> Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("functionDetails"), inspectorEnvironment()->functionCallHandler());
</span><span class="cx"> function.appendArgument(value);
</span><span class="lines">@@ -211,23 +211,23 @@
</span><span class="cx"> *savedResultIndex = savedResultIndexInt;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Ref<Array<Inspector::Protocol::Debugger::CallFrame>> InjectedScript::wrapCallFrames(const Deprecated::ScriptValue& callFrames) const
</del><ins>+Ref<Array<Inspector::Protocol::Debugger::CallFrame>> InjectedScript::wrapCallFrames(JSC::JSValue callFrames) const
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!hasNoValue());
</span><span class="cx"> Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("wrapCallFrames"), inspectorEnvironment()->functionCallHandler());
</span><span class="cx"> function.appendArgument(callFrames);
</span><span class="cx">
</span><span class="cx"> bool hadException = false;
</span><del>- Deprecated::ScriptValue callFramesValue = callFunctionWithEvalEnabled(function, hadException);
</del><ins>+ auto callFramesValue = callFunctionWithEvalEnabled(function, hadException);
</ins><span class="cx"> ASSERT(!hadException);
</span><del>- RefPtr<InspectorValue> result = callFramesValue.toInspectorValue(scriptState());
</del><ins>+ RefPtr<InspectorValue> result = toInspectorValue(*scriptState(), callFramesValue);
</ins><span class="cx"> if (result->type() == InspectorValue::Type::Array)
</span><span class="cx"> return BindingTraits<Array<Inspector::Protocol::Debugger::CallFrame>>::runtimeCast(WTFMove(result)).releaseNonNull();
</span><span class="cx">
</span><span class="cx"> return Array<Inspector::Protocol::Debugger::CallFrame>::create();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<Inspector::Protocol::Runtime::RemoteObject> InjectedScript::wrapObject(const Deprecated::ScriptValue& value, const String& groupName, bool generatePreview) const
</del><ins>+RefPtr<Inspector::Protocol::Runtime::RemoteObject> InjectedScript::wrapObject(JSC::JSValue value, const String& groupName, bool generatePreview) const
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!hasNoValue());
</span><span class="cx"> Deprecated::ScriptFunctionCall wrapFunction(injectedScriptObject(), ASCIILiteral("wrapObject"), inspectorEnvironment()->functionCallHandler());
</span><span class="lines">@@ -237,59 +237,59 @@
</span><span class="cx"> wrapFunction.appendArgument(generatePreview);
</span><span class="cx">
</span><span class="cx"> bool hadException = false;
</span><del>- Deprecated::ScriptValue r = callFunctionWithEvalEnabled(wrapFunction, hadException);
</del><ins>+ auto r = callFunctionWithEvalEnabled(wrapFunction, hadException);
</ins><span class="cx"> if (hadException)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> RefPtr<InspectorObject> resultObject;
</span><del>- bool castSucceeded = r.toInspectorValue(scriptState())->asObject(resultObject);
</del><ins>+ bool castSucceeded = toInspectorValue(*scriptState(), r)->asObject(resultObject);
</ins><span class="cx"> ASSERT_UNUSED(castSucceeded, castSucceeded);
</span><span class="cx">
</span><span class="cx"> return BindingTraits<Inspector::Protocol::Runtime::RemoteObject>::runtimeCast(resultObject);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<Inspector::Protocol::Runtime::RemoteObject> InjectedScript::wrapTable(const Deprecated::ScriptValue& table, const Deprecated::ScriptValue& columns) const
</del><ins>+RefPtr<Inspector::Protocol::Runtime::RemoteObject> InjectedScript::wrapTable(JSC::JSValue table, JSC::JSValue columns) const
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!hasNoValue());
</span><span class="cx"> Deprecated::ScriptFunctionCall wrapFunction(injectedScriptObject(), ASCIILiteral("wrapTable"), inspectorEnvironment()->functionCallHandler());
</span><span class="cx"> wrapFunction.appendArgument(hasAccessToInspectedScriptState());
</span><span class="cx"> wrapFunction.appendArgument(table);
</span><del>- if (columns.hasNoValue())
</del><ins>+ if (!columns)
</ins><span class="cx"> wrapFunction.appendArgument(false);
</span><span class="cx"> else
</span><span class="cx"> wrapFunction.appendArgument(columns);
</span><span class="cx">
</span><span class="cx"> bool hadException = false;
</span><del>- Deprecated::ScriptValue r = callFunctionWithEvalEnabled(wrapFunction, hadException);
</del><ins>+ auto r = callFunctionWithEvalEnabled(wrapFunction, hadException);
</ins><span class="cx"> if (hadException)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> RefPtr<InspectorObject> resultObject;
</span><del>- bool castSucceeded = r.toInspectorValue(scriptState())->asObject(resultObject);
</del><ins>+ bool castSucceeded = toInspectorValue(*scriptState(), r)->asObject(resultObject);
</ins><span class="cx"> ASSERT_UNUSED(castSucceeded, castSucceeded);
</span><span class="cx">
</span><span class="cx"> return BindingTraits<Inspector::Protocol::Runtime::RemoteObject>::runtimeCast(resultObject);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<Inspector::Protocol::Runtime::ObjectPreview> InjectedScript::previewValue(const Deprecated::ScriptValue& value) const
</del><ins>+RefPtr<Inspector::Protocol::Runtime::ObjectPreview> InjectedScript::previewValue(JSC::JSValue value) const
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!hasNoValue());
</span><span class="cx"> Deprecated::ScriptFunctionCall wrapFunction(injectedScriptObject(), ASCIILiteral("previewValue"), inspectorEnvironment()->functionCallHandler());
</span><span class="cx"> wrapFunction.appendArgument(value);
</span><span class="cx">
</span><span class="cx"> bool hadException = false;
</span><del>- Deprecated::ScriptValue r = callFunctionWithEvalEnabled(wrapFunction, hadException);
</del><ins>+ auto r = callFunctionWithEvalEnabled(wrapFunction, hadException);
</ins><span class="cx"> if (hadException)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> RefPtr<InspectorObject> resultObject;
</span><del>- bool castSucceeded = r.toInspectorValue(scriptState())->asObject(resultObject);
</del><ins>+ bool castSucceeded = toInspectorValue(*scriptState(), r)->asObject(resultObject);
</ins><span class="cx"> ASSERT_UNUSED(castSucceeded, castSucceeded);
</span><span class="cx">
</span><span class="cx"> return BindingTraits<Inspector::Protocol::Runtime::ObjectPreview>::runtimeCast(resultObject);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InjectedScript::setExceptionValue(const Deprecated::ScriptValue& value)
</del><ins>+void InjectedScript::setExceptionValue(JSC::JSValue value)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!hasNoValue());
</span><span class="cx"> Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("setExceptionValue"), inspectorEnvironment()->functionCallHandler());
</span><span class="lines">@@ -306,20 +306,20 @@
</span><span class="cx"> makeCall(function, &result);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue InjectedScript::findObjectById(const String& objectId) const
</del><ins>+JSC::JSValue InjectedScript::findObjectById(const String& objectId) const
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!hasNoValue());
</span><span class="cx"> Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("findObjectById"), inspectorEnvironment()->functionCallHandler());
</span><span class="cx"> function.appendArgument(objectId);
</span><span class="cx">
</span><span class="cx"> bool hadException = false;
</span><del>- Deprecated::ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException);
</del><ins>+ auto resultValue = callFunctionWithEvalEnabled(function, hadException);
</ins><span class="cx"> ASSERT(!hadException);
</span><span class="cx">
</span><span class="cx"> return resultValue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InjectedScript::inspectObject(Deprecated::ScriptValue value)
</del><ins>+void InjectedScript::inspectObject(JSC::JSValue value)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!hasNoValue());
</span><span class="cx"> Deprecated::ScriptFunctionCall function(injectedScriptObject(), ASCIILiteral("inspectObject"), inspectorEnvironment()->functionCallHandler());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScripth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScript.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScript.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScript.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -54,25 +54,25 @@
</span><span class="cx">
</span><span class="cx"> void evaluate(ErrorString&, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>* result, Protocol::OptOutput<bool>* wasThrown, Inspector::Protocol::OptOutput<int>* savedResultIndex);
</span><span class="cx"> void callFunctionOn(ErrorString&, const String& objectId, const String& expression, const String& arguments, bool returnByValue, bool generatePreview, RefPtr<Protocol::Runtime::RemoteObject>* result, Protocol::OptOutput<bool>* wasThrown);
</span><del>- void evaluateOnCallFrame(ErrorString&, const Deprecated::ScriptValue& callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>* result, Protocol::OptOutput<bool>* wasThrown, Inspector::Protocol::OptOutput<int>* savedResultIndex);
</del><ins>+ void evaluateOnCallFrame(ErrorString&, JSC::JSValue callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>* result, Protocol::OptOutput<bool>* wasThrown, Inspector::Protocol::OptOutput<int>* savedResultIndex);
</ins><span class="cx"> void getFunctionDetails(ErrorString&, const String& functionId, RefPtr<Protocol::Debugger::FunctionDetails>* result);
</span><del>- void functionDetails(ErrorString&, const Deprecated::ScriptValue&, RefPtr<Protocol::Debugger::FunctionDetails>* result);
</del><ins>+ void functionDetails(ErrorString&, JSC::JSValue, RefPtr<Protocol::Debugger::FunctionDetails>* result);
</ins><span class="cx"> void getProperties(ErrorString&, const String& objectId, bool ownProperties, bool generatePreview, RefPtr<Protocol::Array<Protocol::Runtime::PropertyDescriptor>>* result);
</span><span class="cx"> void getDisplayableProperties(ErrorString&, const String& objectId, bool generatePreview, RefPtr<Protocol::Array<Protocol::Runtime::PropertyDescriptor>>* result);
</span><span class="cx"> void getInternalProperties(ErrorString&, const String& objectId, bool generatePreview, RefPtr<Protocol::Array<Protocol::Runtime::InternalPropertyDescriptor>>* result);
</span><span class="cx"> void getCollectionEntries(ErrorString&, const String& objectId, const String& objectGroup, int startIndex, int numberToFetch, RefPtr<Protocol::Array<Protocol::Runtime::CollectionEntry>>* entries);
</span><span class="cx"> void saveResult(ErrorString&, const String& callArgumentJSON, Inspector::Protocol::OptOutput<int>* savedResultIndex);
</span><span class="cx">
</span><del>- Ref<Protocol::Array<Protocol::Debugger::CallFrame>> wrapCallFrames(const Deprecated::ScriptValue&) const;
- RefPtr<Protocol::Runtime::RemoteObject> wrapObject(const Deprecated::ScriptValue&, const String& groupName, bool generatePreview = false) const;
- RefPtr<Protocol::Runtime::RemoteObject> wrapTable(const Deprecated::ScriptValue& table, const Deprecated::ScriptValue& columns) const;
- RefPtr<Protocol::Runtime::ObjectPreview> previewValue(const Deprecated::ScriptValue&) const;
</del><ins>+ Ref<Protocol::Array<Protocol::Debugger::CallFrame>> wrapCallFrames(JSC::JSValue) const;
+ RefPtr<Protocol::Runtime::RemoteObject> wrapObject(JSC::JSValue, const String& groupName, bool generatePreview = false) const;
+ RefPtr<Protocol::Runtime::RemoteObject> wrapTable(JSC::JSValue table, JSC::JSValue columns) const;
+ RefPtr<Protocol::Runtime::ObjectPreview> previewValue(JSC::JSValue) const;
</ins><span class="cx">
</span><del>- void setExceptionValue(const Deprecated::ScriptValue&);
</del><ins>+ void setExceptionValue(JSC::JSValue);
</ins><span class="cx"> void clearExceptionValue();
</span><span class="cx">
</span><del>- Deprecated::ScriptValue findObjectById(const String& objectId) const;
- void inspectObject(Deprecated::ScriptValue);
</del><ins>+ JSC::JSValue findObjectById(const String& objectId) const;
+ void inspectObject(JSC::JSValue);
</ins><span class="cx"> void releaseObject(const String& objectId);
</span><span class="cx"> void releaseObjectGroup(const String& objectGroup);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -69,12 +69,12 @@
</span><span class="cx"> return m_injectedScriptObject;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue InjectedScriptBase::callFunctionWithEvalEnabled(Deprecated::ScriptFunctionCall& function, bool& hadException) const
</del><ins>+JSC::JSValue InjectedScriptBase::callFunctionWithEvalEnabled(Deprecated::ScriptFunctionCall& function, bool& hadException) const
</ins><span class="cx"> {
</span><span class="cx"> JSC::ExecState* scriptState = m_injectedScriptObject.scriptState();
</span><span class="cx"> JSC::LegacyProfiler::profiler()->suspendProfiling(scriptState);
</span><span class="cx">
</span><del>- Deprecated::ScriptValue resultValue;
</del><ins>+ JSC::JSValue resultValue;
</ins><span class="cx"> {
</span><span class="cx"> JSC::DebuggerEvalEnabler evalEnabler(scriptState);
</span><span class="cx"> resultValue = function.call(hadException);
</span><span class="lines">@@ -93,11 +93,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool hadException = false;
</span><del>- Deprecated::ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException);
</del><ins>+ auto resultValue = callFunctionWithEvalEnabled(function, hadException);
</ins><span class="cx">
</span><span class="cx"> ASSERT(!hadException);
</span><span class="cx"> if (!hadException) {
</span><del>- *result = resultValue.toInspectorValue(m_injectedScriptObject.scriptState());
</del><ins>+ *result = toInspectorValue(*m_injectedScriptObject.scriptState(), resultValue);
</ins><span class="cx"> if (!*result)
</span><span class="cx"> *result = InspectorValue::create(String::format("Object has too long reference chain (must not be longer than %d)", InspectorValue::maxDepth));
</span><span class="cx"> } else
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptBase.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> bool hasAccessToInspectedScriptState() const;
</span><span class="cx">
</span><span class="cx"> const Deprecated::ScriptObject& injectedScriptObject() const;
</span><del>- Deprecated::ScriptValue callFunctionWithEvalEnabled(Deprecated::ScriptFunctionCall&, bool& hadException) const;
</del><ins>+ JSC::JSValue callFunctionWithEvalEnabled(Deprecated::ScriptFunctionCall&, bool& hadException) const;
</ins><span class="cx"> void makeCall(Deprecated::ScriptFunctionCall&, RefPtr<InspectorValue>* result);
</span><span class="cx"> void makeEvalCall(ErrorString&, Deprecated::ScriptFunctionCall&, RefPtr<Protocol::Runtime::RemoteObject>* result, Protocol::OptOutput<bool>* wasThrown, Protocol::OptOutput<int>* savedResult = nullptr);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptModulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptModule.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptModule.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptModule.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -65,9 +65,9 @@
</span><span class="cx"> Deprecated::ScriptFunctionCall function(injectedScript.injectedScriptObject(), ASCIILiteral("module"), injectedScriptManager->inspectorEnvironment().functionCallHandler());
</span><span class="cx"> function.appendArgument(name());
</span><span class="cx"> bool hadException = false;
</span><del>- Deprecated::ScriptValue resultValue = injectedScript.callFunctionWithEvalEnabled(function, hadException);
</del><ins>+ auto resultValue = injectedScript.callFunctionWithEvalEnabled(function, hadException);
</ins><span class="cx"> ASSERT(!hadException);
</span><del>- if (hadException || resultValue.hasNoValue() || !resultValue.isObject()) {
</del><ins>+ if (hadException || !resultValue || !resultValue.isObject()) {
</ins><span class="cx"> Deprecated::ScriptFunctionCall function(injectedScript.injectedScriptObject(), ASCIILiteral("injectModule"), injectedScriptManager->inspectorEnvironment().functionCallHandler());
</span><span class="cx"> function.appendArgument(name());
</span><span class="cx"> function.appendArgument(source());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorScriptDebugListenerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/ScriptDebugListener.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/ScriptDebugListener.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/inspector/ScriptDebugListener.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -33,10 +33,6 @@
</span><span class="cx"> #include "debugger/Debugger.h"
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><del>-namespace Deprecated {
-class ScriptValue;
-}
-
</del><span class="cx"> namespace Inspector {
</span><span class="cx">
</span><span class="cx"> struct ScriptBreakpointAction;
</span><span class="lines">@@ -59,12 +55,12 @@
</span><span class="cx">
</span><span class="cx"> virtual void didParseSource(JSC::SourceID, const Script&) = 0;
</span><span class="cx"> virtual void failedToParseSource(const String& url, const String& data, int firstLine, int errorLine, const String& errorMessage) = 0;
</span><del>- virtual void didPause(JSC::ExecState*, const Deprecated::ScriptValue& callFrames, const Deprecated::ScriptValue& exception) = 0;
</del><ins>+ virtual void didPause(JSC::ExecState&, JSC::JSValue callFrames, JSC::JSValue exception) = 0;
</ins><span class="cx"> virtual void didContinue() = 0;
</span><span class="cx">
</span><del>- virtual void breakpointActionLog(JSC::ExecState*, const String&) = 0;
</del><ins>+ virtual void breakpointActionLog(JSC::ExecState&, const String&) = 0;
</ins><span class="cx"> virtual void breakpointActionSound(int breakpointActionIdentifier) = 0;
</span><del>- virtual void breakpointActionProbe(JSC::ExecState*, const ScriptBreakpointAction&, unsigned batchId, unsigned sampleId, const Deprecated::ScriptValue& result) = 0;
</del><ins>+ virtual void breakpointActionProbe(JSC::ExecState&, const ScriptBreakpointAction&, unsigned batchId, unsigned sampleId, JSC::JSValue result) = 0;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace Inspector
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorScriptDebugServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -109,8 +109,7 @@
</span><span class="cx"> reportException(debuggerCallFrame->exec(), exception);
</span><span class="cx">
</span><span class="cx"> JSC::ExecState* state = debuggerCallFrame->scope()->globalObject()->globalExec();
</span><del>- Deprecated::ScriptValue wrappedResult = Deprecated::ScriptValue(state->vm(), exception ? exception->value() : result);
- dispatchBreakpointActionProbe(state, breakpointAction, wrappedResult);
</del><ins>+ dispatchBreakpointActionProbe(state, breakpointAction, exception ? exception->value() : result);
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> default:
</span><span class="lines">@@ -131,11 +130,9 @@
</span><span class="cx"> ASSERT(isPaused());
</span><span class="cx"> DebuggerCallFrame* debuggerCallFrame = currentDebuggerCallFrame();
</span><span class="cx"> JSGlobalObject* globalObject = debuggerCallFrame->scope()->globalObject();
</span><del>- JSC::ExecState* state = globalObject->globalExec();
- RefPtr<JavaScriptCallFrame> javaScriptCallFrame = JavaScriptCallFrame::create(debuggerCallFrame);
- JSValue jsCallFrame = toJS(state, globalObject, javaScriptCallFrame.get());
-
- listener->didPause(state, Deprecated::ScriptValue(state->vm(), jsCallFrame), exceptionOrCaughtValue(state));
</del><ins>+ JSC::ExecState& state = *globalObject->globalExec();
+ JSValue jsCallFrame = toJS(&state, globalObject, JavaScriptCallFrame::create(debuggerCallFrame).ptr());
+ listener->didPause(state, jsCallFrame, exceptionOrCaughtValue(&state));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ScriptDebugServer::dispatchBreakpointActionLog(ExecState* exec, const String& message)
</span><span class="lines">@@ -151,7 +148,7 @@
</span><span class="cx"> Vector<ScriptDebugListener*> listenersCopy;
</span><span class="cx"> copyToVector(m_listeners, listenersCopy);
</span><span class="cx"> for (auto* listener : listenersCopy)
</span><del>- listener->breakpointActionLog(exec, message);
</del><ins>+ listener->breakpointActionLog(*exec, message);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ScriptDebugServer::dispatchBreakpointActionSound(ExecState*, int breakpointActionIdentifier)
</span><span class="lines">@@ -170,7 +167,7 @@
</span><span class="cx"> listener->breakpointActionSound(breakpointActionIdentifier);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ScriptDebugServer::dispatchBreakpointActionProbe(ExecState* exec, const ScriptBreakpointAction& action, const Deprecated::ScriptValue& sampleValue)
</del><ins>+void ScriptDebugServer::dispatchBreakpointActionProbe(ExecState* exec, const ScriptBreakpointAction& action, JSC::JSValue sampleValue)
</ins><span class="cx"> {
</span><span class="cx"> if (m_callingListeners)
</span><span class="cx"> return;
</span><span class="lines">@@ -185,7 +182,7 @@
</span><span class="cx"> Vector<ScriptDebugListener*> listenersCopy;
</span><span class="cx"> copyToVector(m_listeners, listenersCopy);
</span><span class="cx"> for (auto* listener : listenersCopy)
</span><del>- listener->breakpointActionProbe(exec, action, m_currentProbeBatchId, sampleId, sampleValue);
</del><ins>+ listener->breakpointActionProbe(*exec, action, m_currentProbeBatchId, sampleId, sampleValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ScriptDebugServer::dispatchDidContinue(ScriptDebugListener* listener)
</span><span class="lines">@@ -352,20 +349,18 @@
</span><span class="cx"> detachDebugger(isBeingDestroyed);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue ScriptDebugServer::exceptionOrCaughtValue(JSC::ExecState* state)
</del><ins>+JSC::JSValue ScriptDebugServer::exceptionOrCaughtValue(JSC::ExecState* state)
</ins><span class="cx"> {
</span><span class="cx"> if (reasonForPause() == PausedForException)
</span><del>- return Deprecated::ScriptValue(state->vm(), currentException());
</del><ins>+ return currentException();
</ins><span class="cx">
</span><del>- RefPtr<DebuggerCallFrame> debuggerCallFrame = currentDebuggerCallFrame();
- while (debuggerCallFrame) {
- DebuggerScope* scope = debuggerCallFrame->scope();
- if (scope->isCatchScope())
- return Deprecated::ScriptValue(state->vm(), scope->caughtValue(state));
- debuggerCallFrame = debuggerCallFrame->callerFrame();
</del><ins>+ for (RefPtr<DebuggerCallFrame> frame = currentDebuggerCallFrame(); frame; frame = frame->callerFrame()) {
+ DebuggerScope& scope = *frame->scope();
+ if (scope.isCatchScope())
+ return scope.caughtValue(state);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return Deprecated::ScriptValue();
</del><ins>+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace Inspector
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorScriptDebugServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> void dispatchFailedToParseSource(const ListenerSet& listeners, JSC::SourceProvider*, int errorLine, const String& errorMessage);
</span><span class="cx"> void dispatchBreakpointActionLog(JSC::ExecState*, const String&);
</span><span class="cx"> void dispatchBreakpointActionSound(JSC::ExecState*, int breakpointActionIdentifier);
</span><del>- void dispatchBreakpointActionProbe(JSC::ExecState*, const ScriptBreakpointAction&, const Deprecated::ScriptValue& sample);
</del><ins>+ void dispatchBreakpointActionProbe(JSC::ExecState*, const ScriptBreakpointAction&, JSC::JSValue sample);
</ins><span class="cx">
</span><span class="cx"> bool m_doneProcessingDebuggerEvents {true};
</span><span class="cx">
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> void handlePause(JSC::JSGlobalObject*, JSC::Debugger::ReasonForPause) final;
</span><span class="cx"> void notifyDoneProcessingDebuggerEvents() final;
</span><span class="cx">
</span><del>- Deprecated::ScriptValue exceptionOrCaughtValue(JSC::ExecState*);
</del><ins>+ JSC::JSValue exceptionOrCaughtValue(JSC::ExecState*);
</ins><span class="cx">
</span><span class="cx"> BreakpointIDToActionsMap m_breakpointIDToActions;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -172,10 +172,10 @@
</span><span class="cx"> return reason->openAccessors();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<InspectorObject> InspectorDebuggerAgent::buildExceptionPauseReason(const Deprecated::ScriptValue& exception, const InjectedScript& injectedScript)
</del><ins>+RefPtr<InspectorObject> InspectorDebuggerAgent::buildExceptionPauseReason(JSC::JSValue exception, const InjectedScript& injectedScript)
</ins><span class="cx"> {
</span><del>- ASSERT(!exception.hasNoValue());
- if (exception.hasNoValue())
</del><ins>+ ASSERT(exception);
+ if (!exception)
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> ASSERT(!injectedScript.hasNoValue());
</span><span class="lines">@@ -667,13 +667,13 @@
</span><span class="cx"> m_frontendDispatcher->scriptFailedToParse(url, data, firstLine, errorLine, errorMessage);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InspectorDebuggerAgent::didPause(JSC::ExecState* scriptState, const Deprecated::ScriptValue& callFrames, const Deprecated::ScriptValue& exceptionOrCaughtValue)
</del><ins>+void InspectorDebuggerAgent::didPause(JSC::ExecState& scriptState, JSC::JSValue callFrames, JSC::JSValue exceptionOrCaughtValue)
</ins><span class="cx"> {
</span><del>- ASSERT(scriptState && !m_pausedScriptState);
- m_pausedScriptState = scriptState;
- m_currentCallStack = callFrames;
</del><ins>+ ASSERT(!m_pausedScriptState);
+ m_pausedScriptState = &scriptState;
+ m_currentCallStack = { scriptState.vm(), callFrames };
</ins><span class="cx">
</span><del>- InjectedScript injectedScript = m_injectedScriptManager.injectedScriptFor(scriptState);
</del><ins>+ InjectedScript injectedScript = m_injectedScriptManager.injectedScriptFor(&scriptState);
</ins><span class="cx">
</span><span class="cx"> // If a high level pause pause reason is not already set, try to infer a reason from the debugger.
</span><span class="cx"> if (m_breakReason == DebuggerFrontendDispatcher::Reason::Other) {
</span><span class="lines">@@ -708,7 +708,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Set $exception to the exception or caught value.
</span><del>- if (!exceptionOrCaughtValue.hasNoValue() && !injectedScript.hasNoValue()) {
</del><ins>+ if (exceptionOrCaughtValue && !injectedScript.hasNoValue()) {
</ins><span class="cx"> injectedScript.setExceptionValue(exceptionOrCaughtValue);
</span><span class="cx"> m_hasExceptionValue = true;
</span><span class="cx"> }
</span><span class="lines">@@ -736,10 +736,10 @@
</span><span class="cx"> m_frontendDispatcher->playBreakpointActionSound(breakpointActionIdentifier);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InspectorDebuggerAgent::breakpointActionProbe(JSC::ExecState* scriptState, const ScriptBreakpointAction& action, unsigned batchId, unsigned sampleId, const Deprecated::ScriptValue& sample)
</del><ins>+void InspectorDebuggerAgent::breakpointActionProbe(JSC::ExecState& scriptState, const ScriptBreakpointAction& action, unsigned batchId, unsigned sampleId, JSC::JSValue sample)
</ins><span class="cx"> {
</span><del>- InjectedScript injectedScript = m_injectedScriptManager.injectedScriptFor(scriptState);
- RefPtr<Protocol::Runtime::RemoteObject> payload = injectedScript.wrapObject(sample, objectGroupForBreakpointAction(action), true);
</del><ins>+ InjectedScript injectedScript = m_injectedScriptManager.injectedScriptFor(&scriptState);
+ auto payload = injectedScript.wrapObject(sample, objectGroupForBreakpointAction(action), true);
</ins><span class="cx"> auto result = Protocol::Debugger::ProbeSample::create()
</span><span class="cx"> .setProbeId(action.identifier)
</span><span class="cx"> .setBatchId(batchId)
</span><span class="lines">@@ -747,7 +747,6 @@
</span><span class="cx"> .setTimestamp(m_injectedScriptManager.inspectorEnvironment().executionStopwatch()->elapsedTime())
</span><span class="cx"> .setPayload(payload.release())
</span><span class="cx"> .release();
</span><del>-
</del><span class="cx"> m_frontendDispatcher->didSampleProbe(WTFMove(result));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -759,7 +758,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> m_pausedScriptState = nullptr;
</span><del>- m_currentCallStack = Deprecated::ScriptValue();
</del><ins>+ m_currentCallStack = { };
</ins><span class="cx"> m_injectedScriptManager.releaseObjectGroup(InspectorDebuggerAgent::backtraceObjectGroup);
</span><span class="cx"> clearBreakDetails();
</span><span class="cx"> clearExceptionValue();
</span><span class="lines">@@ -792,7 +791,7 @@
</span><span class="cx"> m_scriptDebugServer.clearBreakpoints();
</span><span class="cx">
</span><span class="cx"> m_pausedScriptState = nullptr;
</span><del>- m_currentCallStack = Deprecated::ScriptValue();
</del><ins>+ m_currentCallStack = { };
</ins><span class="cx"> m_scripts.clear();
</span><span class="cx"> m_breakpointIdentifierToDebugServerBreakpointIDs.clear();
</span><span class="cx"> m_debuggerBreakpointIdentifierToInspectorBreakpointIdentifier.clear();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -61,26 +61,26 @@
</span><span class="cx">
</span><span class="cx"> virtual ~InspectorDebuggerAgent();
</span><span class="cx">
</span><del>- void didCreateFrontendAndBackend(FrontendRouter*, BackendDispatcher*) override;
- void willDestroyFrontendAndBackend(DisconnectReason) override;
</del><ins>+ void didCreateFrontendAndBackend(FrontendRouter*, BackendDispatcher*) final;
+ void willDestroyFrontendAndBackend(DisconnectReason) final;
</ins><span class="cx">
</span><del>- void enable(ErrorString&) override;
- void disable(ErrorString&) override;
- void setBreakpointsActive(ErrorString&, bool active) override;
- void setBreakpointByUrl(ErrorString&, int lineNumber, const String* optionalURL, const String* optionalURLRegex, const int* optionalColumnNumber, const Inspector::InspectorObject* options, Inspector::Protocol::Debugger::BreakpointId*, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::Debugger::Location>>& locations) override;
- void setBreakpoint(ErrorString&, const Inspector::InspectorObject& location, const Inspector::InspectorObject* options, Inspector::Protocol::Debugger::BreakpointId*, RefPtr<Inspector::Protocol::Debugger::Location>& actualLocation) override;
- void removeBreakpoint(ErrorString&, const String& breakpointIdentifier) override;
- void continueToLocation(ErrorString&, const InspectorObject& location) override;
- void searchInContent(ErrorString&, const String& scriptID, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::GenericTypes::SearchMatch>>&) override;
- void getScriptSource(ErrorString&, const String& scriptID, String* scriptSource) override;
- void getFunctionDetails(ErrorString&, const String& functionId, RefPtr<Inspector::Protocol::Debugger::FunctionDetails>&) override;
- void pause(ErrorString&) override;
- void resume(ErrorString&) override;
- void stepOver(ErrorString&) override;
- void stepInto(ErrorString&) override;
- void stepOut(ErrorString&) override;
- void setPauseOnExceptions(ErrorString&, const String& pauseState) override;
- void evaluateOnCallFrame(ErrorString&, const String& callFrameId, const String& expression, const String* objectGroup, const bool* includeCommandLineAPI, const bool* doNotPauseOnExceptionsAndMuteConsole, const bool* returnByValue, const bool* generatePreview, const bool* saveResult, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& result, Inspector::Protocol::OptOutput<bool>* wasThrown, Inspector::Protocol::OptOutput<int>* savedResultIndex) override;
</del><ins>+ void enable(ErrorString&) final;
+ void disable(ErrorString&) final;
+ void setBreakpointsActive(ErrorString&, bool active) final;
+ void setBreakpointByUrl(ErrorString&, int lineNumber, const String* optionalURL, const String* optionalURLRegex, const int* optionalColumnNumber, const Inspector::InspectorObject* options, Inspector::Protocol::Debugger::BreakpointId*, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::Debugger::Location>>& locations) final;
+ void setBreakpoint(ErrorString&, const Inspector::InspectorObject& location, const Inspector::InspectorObject* options, Inspector::Protocol::Debugger::BreakpointId*, RefPtr<Inspector::Protocol::Debugger::Location>& actualLocation) final;
+ void removeBreakpoint(ErrorString&, const String& breakpointIdentifier) final;
+ void continueToLocation(ErrorString&, const InspectorObject& location) final;
+ void searchInContent(ErrorString&, const String& scriptID, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::GenericTypes::SearchMatch>>&) final;
+ void getScriptSource(ErrorString&, const String& scriptID, String* scriptSource) final;
+ void getFunctionDetails(ErrorString&, const String& functionId, RefPtr<Inspector::Protocol::Debugger::FunctionDetails>&) final;
+ void pause(ErrorString&) final;
+ void resume(ErrorString&) final;
+ void stepOver(ErrorString&) final;
+ void stepInto(ErrorString&) final;
+ void stepOut(ErrorString&) final;
+ void setPauseOnExceptions(ErrorString&, const String& pauseState) final;
+ void evaluateOnCallFrame(ErrorString&, const String& callFrameId, const String& expression, const String* objectGroup, const bool* includeCommandLineAPI, const bool* doNotPauseOnExceptionsAndMuteConsole, const bool* returnByValue, const bool* generatePreview, const bool* saveResult, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& result, Inspector::Protocol::OptOutput<bool>* wasThrown, Inspector::Protocol::OptOutput<int>* savedResultIndex) final;
</ins><span class="cx"> void setOverlayMessage(ErrorString&, const String*) override;
</span><span class="cx">
</span><span class="cx"> bool isPaused();
</span><span class="lines">@@ -117,8 +117,8 @@
</span><span class="cx">
</span><span class="cx"> virtual void enable();
</span><span class="cx"> virtual void disable(bool skipRecompile);
</span><del>- void didPause(JSC::ExecState*, const Deprecated::ScriptValue& callFrames, const Deprecated::ScriptValue& exceptionOrCaughtValue) override;
- void didContinue() override;
</del><ins>+ void didPause(JSC::ExecState&, JSC::JSValue callFrames, JSC::JSValue exceptionOrCaughtValue) final;
+ void didContinue() final;
</ins><span class="cx">
</span><span class="cx"> virtual String sourceMapURLForScript(const Script&);
</span><span class="cx">
</span><span class="lines">@@ -130,8 +130,8 @@
</span><span class="cx"> void didParseSource(JSC::SourceID, const Script&) final;
</span><span class="cx"> void failedToParseSource(const String& url, const String& data, int firstLine, int errorLine, const String& errorMessage) final;
</span><span class="cx">
</span><del>- void breakpointActionSound(int breakpointActionIdentifier) override;
- void breakpointActionProbe(JSC::ExecState*, const ScriptBreakpointAction&, unsigned batchId, unsigned sampleId, const Deprecated::ScriptValue& sample) final;
</del><ins>+ void breakpointActionSound(int breakpointActionIdentifier) final;
+ void breakpointActionProbe(JSC::ExecState&, const ScriptBreakpointAction&, unsigned batchId, unsigned sampleId, JSC::JSValue sample) final;
</ins><span class="cx">
</span><span class="cx"> RefPtr<Inspector::Protocol::Debugger::Location> resolveBreakpoint(const String& breakpointIdentifier, JSC::SourceID, const ScriptBreakpoint&);
</span><span class="cx"> bool assertPaused(ErrorString&);
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx"> void clearExceptionValue();
</span><span class="cx">
</span><span class="cx"> RefPtr<InspectorObject> buildBreakpointPauseReason(JSC::BreakpointID);
</span><del>- RefPtr<InspectorObject> buildExceptionPauseReason(const Deprecated::ScriptValue& exception, const InjectedScript&);
</del><ins>+ RefPtr<InspectorObject> buildExceptionPauseReason(JSC::JSValue exception, const InjectedScript&);
</ins><span class="cx">
</span><span class="cx"> bool breakpointActionsFromProtocol(ErrorString&, RefPtr<InspectorArray>& actions, BreakpointActions* result);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorHeapAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorHeapAgent.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorHeapAgent.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorHeapAgent.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -205,14 +205,12 @@
</span><span class="cx">
</span><span class="cx"> // Function preview.
</span><span class="cx"> if (cell->inherits(JSFunction::info())) {
</span><del>- Deprecated::ScriptValue functionScriptValue(m_environment.vm(), JSValue(cell));
- injectedScript.functionDetails(errorString, functionScriptValue, &functionDetails);
</del><ins>+ injectedScript.functionDetails(errorString, cell, &functionDetails);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Object preview.
</span><del>- Deprecated::ScriptValue cellScriptValue(m_environment.vm(), JSValue(cell));
- objectPreview = injectedScript.previewValue(cellScriptValue);
</del><ins>+ objectPreview = injectedScript.previewValue(cell);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorHeapAgent::getRemoteObject(ErrorString& errorString, int heapObjectId, const String* optionalObjectGroup, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& result)
</span><span class="lines">@@ -246,9 +244,8 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- Deprecated::ScriptValue cellScriptValue(m_environment.vm(), JSValue(cell));
</del><span class="cx"> String objectGroup = optionalObjectGroup ? *optionalObjectGroup : String();
</span><del>- result = injectedScript.wrapObject(cellScriptValue, objectGroup, true);
</del><ins>+ result = injectedScript.wrapObject(cell, objectGroup, true);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static Inspector::Protocol::Heap::GarbageCollection::Type protocolTypeForHeapOperation(HeapOperation operation)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsJSGlobalObjectDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -55,9 +55,9 @@
</span><span class="cx"> return injectedScriptManager().injectedScriptFor(exec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void JSGlobalObjectDebuggerAgent::breakpointActionLog(JSC::ExecState* exec, const String& message)
</del><ins>+void JSGlobalObjectDebuggerAgent::breakpointActionLog(JSC::ExecState& state, const String& message)
</ins><span class="cx"> {
</span><del>- m_consoleAgent->addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::JS, MessageType::Log, MessageLevel::Log, message, createScriptCallStack(exec, ScriptCallStack::maxCallStackSizeToCapture), 0));
</del><ins>+ m_consoleAgent->addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::JS, MessageType::Log, MessageLevel::Log, message, createScriptCallStack(&state, ScriptCallStack::maxCallStackSizeToCapture), 0));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace Inspector
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsJSGlobalObjectDebuggerAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -42,12 +42,12 @@
</span><span class="cx">
</span><span class="cx"> InjectedScript injectedScriptForEval(ErrorString&, const int* executionContextId) override;
</span><span class="cx">
</span><del>- void breakpointActionLog(JSC::ExecState*, const String&) override;
</del><ins>+ void breakpointActionLog(JSC::ExecState&, const String&) final;
</ins><span class="cx">
</span><span class="cx"> // NOTE: JavaScript inspector does not yet need to mute a console because no messages
</span><span class="cx"> // are sent to the console outside of the API boundary or console object.
</span><del>- void muteConsole() override { }
- void unmuteConsole() override { }
</del><ins>+ void muteConsole() final { }
+ void unmuteConsole() final { }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> InspectorConsoleAgent* m_consoleAgent { nullptr };
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/ChangeLog        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -1,3 +1,74 @@
</span><ins>+2016-04-15 Darin Adler <darin@apple.com>
+
+ Reduce use of Deprecated::ScriptXXX classes
+ https://bugs.webkit.org/show_bug.cgi?id=156632
+
+ Reviewed by Alex Christensen.
+
+ * Modules/mediastream/SDPProcessor.cpp: Removed unneeded include.
+
+ * bindings/js/JSCommandLineAPIHostCustom.cpp:
+ (WebCore::JSCommandLineAPIHost::inspectedObject): Use JSValue.
+ * bindings/js/JSCustomEventCustom.cpp:
+ (WebCore::JSCustomEvent::detail): Ditto.
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluateInWorld): Ditto.
+ (WebCore::ScriptController::evaluate): Ditto.
+ (WebCore::ScriptController::executeScriptInWorld): Ditto.
+ (WebCore::ScriptController::executeScript): Ditto.
+ (WebCore::ScriptController::executeIfJavaScriptURL): Ditto.
+ * bindings/js/ScriptController.h: Ditto.
+
+ * bindings/js/ScriptGlobalObject.cpp: Removed unused overload of set,
+ and unused remove and folded handleException function into its one call site.
+ (WebCore::ScriptGlobalObject::set): Take references instead of pointers.
+ (WebCore::ScriptGlobalObject::get): Use JSObject instead of Deprecated::ScriptObject.
+ * bindings/js/ScriptGlobalObject.h: Updated for the above.
+
+ * dom/CustomEvent.cpp:
+ (WebCore::CustomEvent::initCustomEvent): Take JSValue and ExecState instead of
+ Deprecated::ScriptValue.
+ (WebCore::CustomEvent::trySerializeDetail): Take a reference instead of a pointer.
+ Also removed an unneeded null check.
+ * dom/CustomEvent.h: Use JSValue.
+ * dom/CustomEvent.idl: Updated for the above.
+
+ * html/HTMLMediaElement.cpp: Remove unneeded include.
+
+ * inspector/CommandLineAPIHost.cpp:
+ (WebCore::CommandLineAPIHost::InspectableObject::get): Take reference instead of
+ pointer and return JSValue.
+ * inspector/CommandLineAPIHost.h: Updated for the above.
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::setDocument): Use "document" instead of "doc".
+ (WebCore::InspectorDOMAgent::setAttributesAsText): Omit redundant class name.
+ (WebCore::InspectorDOMAgent::focusNode): Ditto. Pass reference instead of pointer.
+ (WebCore::InspectorDOMAgent::undo): Ditto.
+ (WebCore::InspectorDOMAgent::redo): Ditto.
+ (WebCore::InspectorDOMAgent::nodeForObjectId): Stop using Deprecated::ScriptValue.
+ (WebCore::InspectorDOMAgent::resolveNode): Ditto.
+ (WebCore::InspectorDOMAgent::scriptValueAsNode): Removed unneeded isObject check,
+ which is already done by JSNode::toWrapped. Use JSValue.
+ (WebCore::InspectorDOMAgent::nodeAsScriptValue): Use JSValue.
+ * inspector/InspectorDOMAgent.h: Updated for the above.
+
+ * inspector/InspectorFrontendClientLocal.cpp:
+ (WebCore::InspectorFrontendClientLocal::windowObjectCleared): Use references instead of
+ pointers and removed unneeded local.
+ (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean): More of the same.
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::showContextMenu): Ditto.
+
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::breakpointActionProbe): Updated to take
+ reference instead of pointer and JSValue instead of ScriptValue.
+ * inspector/InspectorTimelineAgent.h: Ditto.
+ * inspector/PageConsoleAgent.cpp: Ditto.
+ * inspector/PageDebuggerAgent.cpp:
+ (WebCore::PageDebuggerAgent::breakpointActionLog): Ditto.
+ * inspector/PageDebuggerAgent.h: Ditto.
+
</ins><span class="cx"> 2016-04-15 Daniel Bates <dabates@apple.com>
</span><span class="cx">
</span><span class="cx"> CSP: Ignore paths in CSP matching after redirects
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamSDPProcessorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/SDPProcessor.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/SDPProcessor.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/Modules/mediastream/SDPProcessor.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "SDPProcessorScriptResource.h"
</span><span class="cx"> #include "ScriptController.h"
</span><del>-#include "ScriptGlobalObject.h"
</del><span class="cx"> #include "ScriptSourceCode.h"
</span><span class="cx"> #include "inspector/InspectorValues.h"
</span><span class="cx"> #include <bindings/ScriptObject.h>
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCommandLineAPIHostCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCommandLineAPIHostCustom.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCommandLineAPIHostCustom.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/bindings/js/JSCommandLineAPIHostCustom.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -50,7 +50,6 @@
</span><span class="cx"> #include <runtime/JSLock.h>
</span><span class="cx"> #include <runtime/ObjectConstructor.h>
</span><span class="cx">
</span><del>-
</del><span class="cx"> using namespace JSC;
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -62,11 +61,8 @@
</span><span class="cx"> return jsUndefined();
</span><span class="cx">
</span><span class="cx"> JSLockHolder lock(&state);
</span><del>- Deprecated::ScriptValue scriptValue = object->get(&state);
- if (scriptValue.hasNoValue())
- return jsUndefined();
-
- return scriptValue.jsValue();
</del><ins>+ auto scriptValue = object->get(state);
+ return scriptValue ? scriptValue : jsUndefined();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static JSArray* getJSListenerFunctions(ExecState& state, Document* document, const EventListenerInfo& listenerInfo)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCustomEventCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCustomEventCustom.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCustomEventCustom.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/bindings/js/JSCustomEventCustom.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -38,24 +38,22 @@
</span><span class="cx">
</span><span class="cx"> JSValue JSCustomEvent::detail(ExecState& state) const
</span><span class="cx"> {
</span><del>- CustomEvent& event = wrapped();
-
- if (event.detail().hasNoValue())
</del><ins>+ auto& event = wrapped();
+
+ auto detail = event.detail();
+
+ if (!detail)
</ins><span class="cx"> return jsNull();
</span><span class="cx">
</span><del>- JSValue detail = event.detail().jsValue();
-
</del><span class="cx"> if (detail.isObject() && &worldForDOMObject(detail.getObject()) != &currentWorld(&state)) {
</span><span class="cx"> // We need to make sure CustomEvents do not leak their detail property across isolated DOM worlds.
</span><span class="cx"> // Ideally, we would check that the worlds have different privileges but that's not possible yet.
</span><del>- RefPtr<SerializedScriptValue> serializedDetail = event.trySerializeDetail(&state);
-
</del><ins>+ auto serializedDetail = event.trySerializeDetail(state);
</ins><span class="cx"> if (!serializedDetail)
</span><span class="cx"> return jsNull();
</span><del>-
</del><span class="cx"> return serializedDetail->deserialize(&state, globalObject(), nullptr);
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> return detail;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptController.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptController.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/bindings/js/ScriptController.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx"> return *windowShell.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue ScriptController::evaluateInWorld(const ScriptSourceCode& sourceCode, DOMWrapperWorld& world, ExceptionDetails* exceptionDetails)
</del><ins>+JSValue ScriptController::evaluateInWorld(const ScriptSourceCode& sourceCode, DOMWrapperWorld& world, ExceptionDetails* exceptionDetails)
</ins><span class="cx"> {
</span><span class="cx"> JSLockHolder lock(world.vm());
</span><span class="cx">
</span><span class="lines">@@ -168,14 +168,14 @@
</span><span class="cx"> if (evaluationException) {
</span><span class="cx"> reportException(exec, evaluationException, sourceCode.cachedScript(), exceptionDetails);
</span><span class="cx"> m_sourceURL = savedSourceURL;
</span><del>- return Deprecated::ScriptValue();
</del><ins>+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> m_sourceURL = savedSourceURL;
</span><del>- return Deprecated::ScriptValue(exec->vm(), returnValue);
</del><ins>+ return returnValue;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode, ExceptionDetails* exceptionDetails)
</del><ins>+JSValue ScriptController::evaluate(const ScriptSourceCode& sourceCode, ExceptionDetails* exceptionDetails)
</ins><span class="cx"> {
</span><span class="cx"> return evaluateInWorld(sourceCode, mainThreadNormalWorld(), exceptionDetails);
</span><span class="cx"> }
</span><span class="lines">@@ -503,13 +503,13 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue ScriptController::executeScriptInWorld(DOMWrapperWorld& world, const String& script, bool forceUserGesture)
</del><ins>+JSValue ScriptController::executeScriptInWorld(DOMWrapperWorld& world, const String& script, bool forceUserGesture)
</ins><span class="cx"> {
</span><span class="cx"> UserGestureIndicator gestureIndicator(forceUserGesture ? DefinitelyProcessingUserGesture : PossiblyProcessingUserGesture);
</span><span class="cx"> ScriptSourceCode sourceCode(script, m_frame.document()->url());
</span><span class="cx">
</span><span class="cx"> if (!canExecuteScripts(AboutToExecuteScript) || isPaused())
</span><del>- return Deprecated::ScriptValue();
</del><ins>+ return { };
</ins><span class="cx">
</span><span class="cx"> return evaluateInWorld(sourceCode, world);
</span><span class="cx"> }
</span><span class="lines">@@ -529,16 +529,16 @@
</span><span class="cx"> return m_frame.loader().client().allowScript(m_frame.settings().isScriptEnabled());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue ScriptController::executeScript(const String& script, bool forceUserGesture, ExceptionDetails* exceptionDetails)
</del><ins>+JSValue ScriptController::executeScript(const String& script, bool forceUserGesture, ExceptionDetails* exceptionDetails)
</ins><span class="cx"> {
</span><span class="cx"> UserGestureIndicator gestureIndicator(forceUserGesture ? DefinitelyProcessingUserGesture : PossiblyProcessingUserGesture);
</span><span class="cx"> return executeScript(ScriptSourceCode(script, m_frame.document()->url()), exceptionDetails);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue ScriptController::executeScript(const ScriptSourceCode& sourceCode, ExceptionDetails* exceptionDetails)
</del><ins>+JSValue ScriptController::executeScript(const ScriptSourceCode& sourceCode, ExceptionDetails* exceptionDetails)
</ins><span class="cx"> {
</span><span class="cx"> if (!canExecuteScripts(AboutToExecuteScript) || isPaused())
</span><del>- return Deprecated::ScriptValue();
</del><ins>+ return { }; // FIXME: Would jsNull be better?
</ins><span class="cx">
</span><span class="cx"> Ref<Frame> protect(m_frame); // Script execution can destroy the frame, and thus the ScriptController.
</span><span class="cx">
</span><span class="lines">@@ -561,7 +561,7 @@
</span><span class="cx"> const int javascriptSchemeLength = sizeof("javascript:") - 1;
</span><span class="cx">
</span><span class="cx"> String decodedURL = decodeURLEscapeSequences(url.string());
</span><del>- Deprecated::ScriptValue result = executeScript(decodedURL.substring(javascriptSchemeLength));
</del><ins>+ auto result = executeScript(decodedURL.substring(javascriptSchemeLength));
</ins><span class="cx">
</span><span class="cx"> // If executing script caused this frame to be removed from the page, we
</span><span class="cx"> // don't want to try to replace its document!
</span><span class="lines">@@ -569,9 +569,7 @@
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> String scriptResult;
</span><del>- JSDOMWindowShell* shell = windowShell(mainThreadNormalWorld());
- JSC::ExecState* exec = shell->window()->globalExec();
- if (!result.getString(exec, scriptResult))
</del><ins>+ if (!result || !result.getString(windowShell(mainThreadNormalWorld())->window()->globalExec(), scriptResult))
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> // FIXME: We should always replace the document, but doing so
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptController.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptController.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/bindings/js/ScriptController.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -101,9 +101,9 @@
</span><span class="cx">
</span><span class="cx"> static void getAllWorlds(Vector<Ref<DOMWrapperWorld>>&);
</span><span class="cx">
</span><del>- Deprecated::ScriptValue executeScript(const ScriptSourceCode&, ExceptionDetails* = nullptr);
- WEBCORE_EXPORT Deprecated::ScriptValue executeScript(const String& script, bool forceUserGesture = false, ExceptionDetails* = nullptr);
- WEBCORE_EXPORT Deprecated::ScriptValue executeScriptInWorld(DOMWrapperWorld&, const String& script, bool forceUserGesture = false);
</del><ins>+ JSC::JSValue executeScript(const ScriptSourceCode&, ExceptionDetails* = nullptr);
+ WEBCORE_EXPORT JSC::JSValue executeScript(const String& script, bool forceUserGesture = false, ExceptionDetails* = nullptr);
+ WEBCORE_EXPORT JSC::JSValue executeScriptInWorld(DOMWrapperWorld&, const String& script, bool forceUserGesture = false);
</ins><span class="cx">
</span><span class="cx"> // Returns true if argument is a JavaScript URL.
</span><span class="cx"> bool executeIfJavaScriptURL(const URL&, ShouldReplaceDocumentIfJavaScriptURL shouldReplaceDocumentIfJavaScriptURL = ReplaceDocumentIfJavaScriptURL);
</span><span class="lines">@@ -112,8 +112,8 @@
</span><span class="cx"> // Darwin is an exception to this rule: it is OK to call this function from any thread, even reentrantly.
</span><span class="cx"> static void initializeThreading();
</span><span class="cx">
</span><del>- Deprecated::ScriptValue evaluate(const ScriptSourceCode&, ExceptionDetails* = nullptr);
- Deprecated::ScriptValue evaluateInWorld(const ScriptSourceCode&, DOMWrapperWorld&, ExceptionDetails* = nullptr);
</del><ins>+ JSC::JSValue evaluate(const ScriptSourceCode&, ExceptionDetails* = nullptr);
+ JSC::JSValue evaluateInWorld(const ScriptSourceCode&, DOMWrapperWorld&, ExceptionDetails* = nullptr);
</ins><span class="cx">
</span><span class="cx"> WTF::TextPosition eventHandlerPosition() const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptGlobalObject.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptGlobalObject.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/bindings/js/ScriptGlobalObject.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -33,57 +33,34 @@
</span><span class="cx">
</span><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSInspectorFrontendHost.h"
</span><del>-#include <bindings/ScriptObject.h>
</del><span class="cx"> #include <runtime/IdentifierInlines.h>
</span><del>-#include <runtime/JSLock.h>
</del><span class="cx">
</span><span class="cx"> using namespace JSC;
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-static bool handleException(JSC::ExecState* scriptState)
</del><ins>+bool ScriptGlobalObject::set(ExecState& scriptState, const char* name, InspectorFrontendHost& value)
</ins><span class="cx"> {
</span><del>- if (!scriptState->hadException())
- return true;
-
- reportException(scriptState, scriptState->exception());
- return false;
</del><ins>+ auto& vm = scriptState.vm();
+ JSLockHolder lock(vm);
+ auto& globalObject = *jsCast<JSDOMGlobalObject*>(scriptState.lexicalGlobalObject());
+ globalObject.putDirect(vm, Identifier::fromString(&vm, name), toJS(&scriptState, &globalObject, value));
+ if (scriptState.hadException()) {
+ reportException(&scriptState, scriptState.exception());
+ return false;
+ }
+ return true;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-bool ScriptGlobalObject::set(JSC::ExecState* scriptState, const char* name, const Deprecated::ScriptObject& value)
</del><ins>+bool ScriptGlobalObject::get(ExecState& scriptState, const char* name, JSObject*& object)
</ins><span class="cx"> {
</span><del>- JSLockHolder lock(scriptState);
- scriptState->lexicalGlobalObject()->putDirect(scriptState->vm(), Identifier::fromString(scriptState, name), value.jsObject());
- return handleException(scriptState);
-}
-
-bool ScriptGlobalObject::set(JSC::ExecState* scriptState, const char* name, InspectorFrontendHost* value)
-{
- JSLockHolder lock(scriptState);
- JSDOMGlobalObject* globalObject = jsCast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject());
- globalObject->putDirect(scriptState->vm(), Identifier::fromString(scriptState, name), toJS(scriptState, globalObject, value));
- return handleException(scriptState);
-}
-
-bool ScriptGlobalObject::get(JSC::ExecState* scriptState, const char* name, Deprecated::ScriptObject& value)
-{
- JSLockHolder lock(scriptState);
- JSValue jsValue = scriptState->lexicalGlobalObject()->get(scriptState, Identifier::fromString(scriptState, name));
- if (!jsValue)
</del><ins>+ auto& vm = scriptState.vm();
+ JSLockHolder lock(vm);
+ JSValue value = scriptState.lexicalGlobalObject()->get(&scriptState, Identifier::fromString(&vm, name));
+ if (!value || !value.isObject())
</ins><span class="cx"> return false;
</span><del>-
- if (!jsValue.isObject())
- return false;
-
- value = Deprecated::ScriptObject(scriptState, asObject(jsValue));
</del><ins>+ object = asObject(value);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool ScriptGlobalObject::remove(JSC::ExecState* scriptState, const char* name)
-{
- JSLockHolder lock(scriptState);
- scriptState->lexicalGlobalObject()->methodTable()->deleteProperty(scriptState->lexicalGlobalObject(), scriptState, Identifier::fromString(scriptState, name));
- return handleException(scriptState);
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptGlobalObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptGlobalObject.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptGlobalObject.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/bindings/js/ScriptGlobalObject.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -31,12 +31,9 @@
</span><span class="cx"> #ifndef ScriptGlobalObject_h
</span><span class="cx"> #define ScriptGlobalObject_h
</span><span class="cx">
</span><del>-namespace Deprecated {
-class ScriptObject;
-}
-
</del><span class="cx"> namespace JSC {
</span><span class="cx"> class ExecState;
</span><ins>+class JSObject;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -45,13 +42,11 @@
</span><span class="cx">
</span><span class="cx"> class ScriptGlobalObject {
</span><span class="cx"> public:
</span><del>- static bool set(JSC::ExecState*, const char* name, const Deprecated::ScriptObject&);
- WEBCORE_EXPORT static bool set(JSC::ExecState*, const char* name, InspectorFrontendHost*);
</del><ins>+ WEBCORE_EXPORT static bool set(JSC::ExecState&, const char* name, InspectorFrontendHost&);
+ static bool get(JSC::ExecState&, const char* name, JSC::JSObject*&);
</ins><span class="cx">
</span><del>- static bool get(JSC::ExecState*, const char* name, Deprecated::ScriptObject&);
- static bool remove(JSC::ExecState*, const char* name);
</del><span class="cx"> private:
</span><del>- ScriptGlobalObject() { }
</del><ins>+ ScriptGlobalObject() = delete;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoredomCustomEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/CustomEvent.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CustomEvent.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/dom/CustomEvent.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -45,25 +45,24 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CustomEvent::initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, const Deprecated::ScriptValue& detail)
</del><ins>+void CustomEvent::initCustomEvent(JSC::ExecState& state, const AtomicString& type, bool canBubble, bool cancelable, JSC::JSValue detail)
</ins><span class="cx"> {
</span><span class="cx"> if (dispatched())
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> initEvent(type, canBubble, cancelable);
</span><span class="cx">
</span><del>- m_detail = detail;
</del><ins>+ m_detail = { state.vm(), detail };
</ins><span class="cx"> m_serializedDetail = nullptr;
</span><span class="cx"> m_triedToSerialize = false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<SerializedScriptValue> CustomEvent::trySerializeDetail(JSC::ExecState* exec)
</del><ins>+RefPtr<SerializedScriptValue> CustomEvent::trySerializeDetail(JSC::ExecState& state)
</ins><span class="cx"> {
</span><del>- if (!m_serializedDetail && !m_triedToSerialize) {
- m_serializedDetail = SerializedScriptValue::create(exec, m_detail.jsValue(), nullptr, nullptr, NonThrowing);
</del><ins>+ if (!m_triedToSerialize) {
+ m_serializedDetail = SerializedScriptValue::create(&state, m_detail, nullptr, nullptr, NonThrowing);
</ins><span class="cx"> m_triedToSerialize = true;
</span><span class="cx"> }
</span><del>-
</del><span class="cx"> return m_serializedDetail;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomCustomEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/CustomEvent.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CustomEvent.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/dom/CustomEvent.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -50,19 +50,20 @@
</span><span class="cx"> return adoptRef(*new CustomEvent(type, initializer));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- void initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, const Deprecated::ScriptValue& detail);
</del><ins>+ void initCustomEvent(JSC::ExecState&, const AtomicString& type, bool canBubble, bool cancelable, JSC::JSValue detail);
</ins><span class="cx">
</span><span class="cx"> EventInterface eventInterface() const override;
</span><span class="cx">
</span><del>- const Deprecated::ScriptValue& detail() const { return m_detail; }
</del><ins>+ JSC::JSValue detail() const { return m_detail.jsValue(); }
</ins><span class="cx">
</span><del>- RefPtr<SerializedScriptValue> trySerializeDetail(JSC::ExecState*);
</del><ins>+ RefPtr<SerializedScriptValue> trySerializeDetail(JSC::ExecState&);
+ void visitAdditionalChildren(JSC::SlotVisitor&);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> CustomEvent();
</span><span class="cx"> CustomEvent(const AtomicString& type, const CustomEventInit& initializer);
</span><span class="cx">
</span><del>- Deprecated::ScriptValue m_detail;
</del><ins>+ Deprecated::ScriptValue m_detail; // FIXME: Why is it OK to use a strong reference here? What prevents a reference cycle?
</ins><span class="cx"> RefPtr<SerializedScriptValue> m_serializedDetail;
</span><span class="cx"> bool m_triedToSerialize { false };
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoredomCustomEventidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/CustomEvent.idl (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CustomEvent.idl        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/dom/CustomEvent.idl        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -29,9 +29,5 @@
</span><span class="cx"> ] interface CustomEvent : Event {
</span><span class="cx"> [InitializedByEventConstructor, CustomGetter] readonly attribute any detail;
</span><span class="cx">
</span><del>- void initCustomEvent([Default=Undefined] optional DOMString typeArg,
- [Default=Undefined] optional boolean canBubbleArg,
- [Default=Undefined] optional boolean cancelableArg,
- [Default=Undefined] optional any detailArg);
</del><ins>+ [CallWith=ScriptState] void initCustomEvent([Default=Undefined] optional DOMString typeArg, [Default=Undefined] optional boolean canBubbleArg, [Default=Undefined] optional boolean cancelableArg, [Default=Undefined] optional any detailArg);
</ins><span class="cx"> };
</span><del>-
</del></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -148,7 +148,6 @@
</span><span class="cx"> #if ENABLE(MEDIA_CONTROLS_SCRIPT)
</span><span class="cx"> #include "JSMediaControlsHost.h"
</span><span class="cx"> #include "MediaControlsHost.h"
</span><del>-#include "ScriptGlobalObject.h"
</del><span class="cx"> #include <bindings/ScriptObject.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorCommandLineAPIHostcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/CommandLineAPIHost.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/CommandLineAPIHost.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/inspector/CommandLineAPIHost.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -107,9 +107,9 @@
</span><span class="cx"> Pasteboard::createForCopyAndPaste()->writePlainText(text, Pasteboard::CannotSmartReplace);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue CommandLineAPIHost::InspectableObject::get(JSC::ExecState*)
</del><ins>+JSC::JSValue CommandLineAPIHost::InspectableObject::get(JSC::ExecState&)
</ins><span class="cx"> {
</span><del>- return Deprecated::ScriptValue();
</del><ins>+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CommandLineAPIHost::addInspectedObject(std::unique_ptr<CommandLineAPIHost::InspectableObject> object)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorCommandLineAPIHosth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/CommandLineAPIHost.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/CommandLineAPIHost.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/inspector/CommandLineAPIHost.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -30,16 +30,11 @@
</span><span class="cx"> #ifndef CommandLineAPIHost_h
</span><span class="cx"> #define CommandLineAPIHost_h
</span><span class="cx">
</span><del>-#include "ScriptState.h"
</del><span class="cx"> #include <inspector/PerGlobalObjectWrapperWorld.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><del>-namespace Deprecated {
-class ScriptValue;
-}
-
</del><span class="cx"> namespace JSC {
</span><span class="cx"> class JSValue;
</span><span class="cx"> }
</span><span class="lines">@@ -90,7 +85,7 @@
</span><span class="cx"> class InspectableObject {
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>- virtual Deprecated::ScriptValue get(JSC::ExecState*);
</del><ins>+ virtual JSC::JSValue get(JSC::ExecState&);
</ins><span class="cx"> virtual ~InspectableObject() { }
</span><span class="cx"> };
</span><span class="cx"> void addInspectedObject(std::unique_ptr<InspectableObject>);
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -277,20 +277,20 @@
</span><span class="cx"> m_domListener = listener;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InspectorDOMAgent::setDocument(Document* doc)
</del><ins>+void InspectorDOMAgent::setDocument(Document* document)
</ins><span class="cx"> {
</span><del>- if (doc == m_document.get())
</del><ins>+ if (document == m_document.get())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> reset();
</span><span class="cx">
</span><del>- m_document = doc;
</del><ins>+ m_document = document;
</ins><span class="cx">
</span><span class="cx"> if (!m_documentRequested)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- // Immediately communicate 0 document or document that has finished loading.
- if (!doc || !doc->parsing())
</del><ins>+ // Immediately communicate null document or document that has finished loading.
+ if (!document || !document->parsing())
</ins><span class="cx"> m_frontendDispatcher->documentUpdated();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -663,7 +663,7 @@
</span><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> parsedElement.get()->setInnerHTML("<span " + text + "></span>", ec);
</span><span class="cx"> if (ec) {
</span><del>- errorString = InspectorDOMAgent::toErrorString(ec);
</del><ins>+ errorString = toErrorString(ec);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -998,7 +998,7 @@
</span><span class="cx"> if (injectedScript.hasNoValue())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- injectedScript.inspectObject(InspectorDOMAgent::nodeAsScriptValue(scriptState, node.get()));
</del><ins>+ injectedScript.inspectObject(nodeAsScriptValue(*scriptState, node.get()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorDOMAgent::mouseDidMoveOverElement(const HitTestResult& result, unsigned)
</span><span class="lines">@@ -1190,14 +1190,14 @@
</span><span class="cx"> {
</span><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> m_history->undo(ec);
</span><del>- errorString = InspectorDOMAgent::toErrorString(ec);
</del><ins>+ errorString = toErrorString(ec);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorDOMAgent::redo(ErrorString& errorString)
</span><span class="cx"> {
</span><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> m_history->redo(ec);
</span><del>- errorString = InspectorDOMAgent::toErrorString(ec);
</del><ins>+ errorString = toErrorString(ec);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorDOMAgent::markUndoableState(ErrorString&)
</span><span class="lines">@@ -2111,8 +2111,7 @@
</span><span class="cx"> if (injectedScript.hasNoValue())
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- Deprecated::ScriptValue value = injectedScript.findObjectById(objectId);
- return InspectorDOMAgent::scriptValueAsNode(value);
</del><ins>+ return scriptValueAsNode(injectedScript.findObjectById(objectId));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorDOMAgent::pushNodeByPathToFrontend(ErrorString& errorString, const String& path, int* nodeId)
</span><span class="lines">@@ -2151,24 +2150,23 @@
</span><span class="cx"> if (injectedScript.hasNoValue())
</span><span class="cx"> return 0;
</span><span class="cx">
</span><del>- return injectedScript.wrapObject(InspectorDOMAgent::nodeAsScriptValue(scriptState, node), objectGroup);
</del><ins>+ return injectedScript.wrapObject(nodeAsScriptValue(*scriptState, node), objectGroup);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-Node* InspectorDOMAgent::scriptValueAsNode(Deprecated::ScriptValue value)
</del><ins>+Node* InspectorDOMAgent::scriptValueAsNode(JSC::JSValue value)
</ins><span class="cx"> {
</span><del>- if (!value.isObject() || value.isNull())
</del><ins>+ if (!value)
</ins><span class="cx"> return nullptr;
</span><del>-
- return JSNode::toWrapped(value.jsValue());
</del><ins>+ return JSNode::toWrapped(value);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-Deprecated::ScriptValue InspectorDOMAgent::nodeAsScriptValue(JSC::ExecState* state, Node* node)
</del><ins>+JSC::JSValue InspectorDOMAgent::nodeAsScriptValue(JSC::ExecState& state, Node* node)
</ins><span class="cx"> {
</span><del>- if (!shouldAllowAccessToNode(state, node))
- return Deprecated::ScriptValue(state->vm(), JSC::jsNull());
</del><ins>+ if (!shouldAllowAccessToNode(&state, node))
+ return JSC::jsNull();
</ins><span class="cx">
</span><del>- JSC::JSLockHolder lock(state);
- return Deprecated::ScriptValue(state->vm(), toJS(state, deprecatedGlobalObjectForPrototype(state), node));
</del><ins>+ JSC::JSLockHolder lock(&state);
+ return toJS(&state, deprecatedGlobalObjectForPrototype(&state), node);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMAgent.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -44,14 +44,14 @@
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/text/AtomicString.h>
</span><span class="cx">
</span><del>-namespace Deprecated {
-class ScriptValue;
-}
-
</del><span class="cx"> namespace Inspector {
</span><span class="cx"> class InjectedScriptManager;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+namespace JSC {
+class JSValue;
+}
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class AccessibilityObject;
</span><span class="lines">@@ -206,8 +206,8 @@
</span><span class="cx"> Element* assertElement(ErrorString&, int nodeId);
</span><span class="cx"> Document* assertDocument(ErrorString&, int nodeId);
</span><span class="cx">
</span><del>- static Node* scriptValueAsNode(Deprecated::ScriptValue);
- static Deprecated::ScriptValue nodeAsScriptValue(JSC::ExecState*, Node*);
</del><ins>+ static Node* scriptValueAsNode(JSC::JSValue);
+ static JSC::JSValue nodeAsScriptValue(JSC::ExecState&, Node*);
</ins><span class="cx">
</span><span class="cx"> // Methods called from other agents.
</span><span class="cx"> InspectorPageAgent* pageAgent() { return m_pageAgent; }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorFrontendClientLocalcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -152,9 +152,8 @@
</span><span class="cx"> if (m_frontendHost)
</span><span class="cx"> m_frontendHost->disconnectClient();
</span><span class="cx">
</span><del>- JSC::ExecState* frontendExecState = execStateFromPage(debuggerWorld(), m_frontendPage);
</del><span class="cx"> m_frontendHost = InspectorFrontendHost::create(this, m_frontendPage);
</span><del>- ScriptGlobalObject::set(frontendExecState, "InspectorFrontendHost", m_frontendHost.get());
</del><ins>+ ScriptGlobalObject::set(*execStateFromPage(debuggerWorld(), m_frontendPage), "InspectorFrontendHost", *m_frontendHost);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorFrontendClientLocal::frontendLoaded()
</span><span class="lines">@@ -364,8 +363,8 @@
</span><span class="cx">
</span><span class="cx"> bool InspectorFrontendClientLocal::evaluateAsBoolean(const String& expression)
</span><span class="cx"> {
</span><del>- Deprecated::ScriptValue value = m_frontendPage->mainFrame().script().executeScript(expression);
- return value.toString(mainWorldExecState(&m_frontendPage->mainFrame())) == "true";
</del><ins>+ auto& state = *mainWorldExecState(&m_frontendPage->mainFrame());
+ return m_frontendPage->mainFrame().script().executeScript(expression).toWTFString(&state) == "true";
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorFrontendClientLocal::evaluateOnLoad(const String& expression)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorFrontendHostcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -317,22 +317,24 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><ins>+
</ins><span class="cx"> void InspectorFrontendHost::showContextMenu(Event* event, const Vector<ContextMenuItem>& items)
</span><span class="cx"> {
</span><span class="cx"> if (!event)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> ASSERT(m_frontendPage);
</span><del>- JSC::ExecState* frontendExecState = execStateFromPage(debuggerWorld(), m_frontendPage);
- Deprecated::ScriptObject frontendApiObject;
- if (!ScriptGlobalObject::get(frontendExecState, "InspectorFrontendAPI", frontendApiObject)) {
</del><ins>+ auto& state = *execStateFromPage(debuggerWorld(), m_frontendPage);
+ JSC::JSObject* frontendApiObject;
+ if (!ScriptGlobalObject::get(state, "InspectorFrontendAPI", frontendApiObject)) {
</ins><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- RefPtr<FrontendMenuProvider> menuProvider = FrontendMenuProvider::create(this, frontendApiObject, items);
- m_frontendPage->contextMenuController().showContextMenu(event, menuProvider);
- m_menuProvider = menuProvider.get();
</del><ins>+ auto menuProvider = FrontendMenuProvider::create(this, { &state, frontendApiObject }, items);
+ m_frontendPage->contextMenuController().showContextMenu(event, menuProvider.ptr());
+ m_menuProvider = menuProvider.ptr();
</ins><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> void InspectorFrontendHost::dispatchEventAsContextMenuEvent(Event* event)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorTimelineAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -411,12 +411,9 @@
</span><span class="cx">
</span><span class="cx"> // ScriptDebugListener
</span><span class="cx">
</span><del>-void InspectorTimelineAgent::breakpointActionProbe(JSC::ExecState* exec, const Inspector::ScriptBreakpointAction& action, unsigned batchId, unsigned sampleId, const Deprecated::ScriptValue&)
</del><ins>+void InspectorTimelineAgent::breakpointActionProbe(JSC::ExecState& state, const Inspector::ScriptBreakpointAction& action, unsigned /*batchId*/, unsigned sampleId, JSC::JSValue)
</ins><span class="cx"> {
</span><del>- UNUSED_PARAM(batchId);
- ASSERT(exec);
-
- appendRecord(TimelineRecordFactory::createProbeSampleData(action, sampleId), TimelineRecordType::ProbeSample, false, frameFromExecState(exec));
</del><ins>+ appendRecord(TimelineRecordFactory::createProbeSampleData(action, sampleId), TimelineRecordType::ProbeSample, false, frameFromExecState(&state));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static Inspector::Protocol::Timeline::EventType toProtocol(TimelineRecordType type)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorTimelineAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -95,11 +95,11 @@
</span><span class="cx"> InspectorTimelineAgent(WebAgentContext&, InspectorPageAgent*);
</span><span class="cx"> virtual ~InspectorTimelineAgent();
</span><span class="cx">
</span><del>- void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override;
- void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override;
</del><ins>+ void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) final;
+ void willDestroyFrontendAndBackend(Inspector::DisconnectReason) final;
</ins><span class="cx">
</span><del>- void start(ErrorString&, const int* maxCallStackDepth = nullptr) override;
- void stop(ErrorString&) override;
</del><ins>+ void start(ErrorString&, const int* maxCallStackDepth = nullptr) final;
+ void stop(ErrorString&) final;
</ins><span class="cx">
</span><span class="cx"> int id() const { return m_id; }
</span><span class="cx">
</span><span class="lines">@@ -138,18 +138,17 @@
</span><span class="cx"> void time(Frame&, const String&);
</span><span class="cx"> void timeEnd(Frame&, const String&);
</span><span class="cx">
</span><del>-protected:
</del><ins>+private:
</ins><span class="cx"> // ScriptDebugListener
</span><del>- void didParseSource(JSC::SourceID, const Script&) override { }
- void failedToParseSource(const String&, const String&, int, int, const String&) override { }
- void didPause(JSC::ExecState*, const Deprecated::ScriptValue&, const Deprecated::ScriptValue&) override { }
- void didContinue() override { }
</del><ins>+ void didParseSource(JSC::SourceID, const Script&) final { }
+ void failedToParseSource(const String&, const String&, int, int, const String&) final { }
+ void didPause(JSC::ExecState&, JSC::JSValue, JSC::JSValue) final { }
+ void didContinue() final { }
</ins><span class="cx">
</span><del>- void breakpointActionLog(JSC::ExecState*, const String&) override { }
- void breakpointActionSound(int) override { }
- void breakpointActionProbe(JSC::ExecState*, const Inspector::ScriptBreakpointAction&, unsigned batchId, unsigned sampleId, const Deprecated::ScriptValue& result) override;
</del><ins>+ void breakpointActionLog(JSC::ExecState&, const String&) final { }
+ void breakpointActionSound(int) final { }
+ void breakpointActionProbe(JSC::ExecState&, const Inspector::ScriptBreakpointAction&, unsigned batchId, unsigned sampleId, JSC::JSValue result) final;
</ins><span class="cx">
</span><del>-private:
</del><span class="cx"> friend class TimelineRecordStack;
</span><span class="cx">
</span><span class="cx"> struct TimelineRecordEntry {
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorPageConsoleAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/PageConsoleAgent.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/PageConsoleAgent.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/inspector/PageConsoleAgent.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> class InspectableNode final : public CommandLineAPIHost::InspectableObject {
</span><span class="cx"> public:
</span><span class="cx"> explicit InspectableNode(Node* node) : m_node(node) { }
</span><del>- Deprecated::ScriptValue get(JSC::ExecState* state) override
</del><ins>+ JSC::JSValue get(JSC::ExecState& state) final
</ins><span class="cx"> {
</span><span class="cx"> return InspectorDOMAgent::nodeAsScriptValue(state, m_node.get());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorPageDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -103,9 +103,9 @@
</span><span class="cx"> PageConsoleClient::unmute();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PageDebuggerAgent::breakpointActionLog(JSC::ExecState* exec, const String& message)
</del><ins>+void PageDebuggerAgent::breakpointActionLog(JSC::ExecState& state, const String& message)
</ins><span class="cx"> {
</span><del>- m_pageAgent->page().console().addMessage(MessageSource::JS, MessageLevel::Log, message, createScriptCallStack(exec, ScriptCallStack::maxCallStackSizeToCapture));
</del><ins>+ m_pageAgent->page().console().addMessage(MessageSource::JS, MessageLevel::Log, message, createScriptCallStack(&state, ScriptCallStack::maxCallStackSizeToCapture));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> InjectedScript PageDebuggerAgent::injectedScriptForEval(ErrorString& errorString, const int* executionContextId)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorPageDebuggerAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/PageDebuggerAgent.h (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/PageDebuggerAgent.h        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebCore/inspector/PageDebuggerAgent.h        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -63,10 +63,10 @@
</span><span class="cx"> void muteConsole() override;
</span><span class="cx"> void unmuteConsole() override;
</span><span class="cx">
</span><del>- void breakpointActionLog(JSC::ExecState*, const String&) override;
</del><ins>+ void breakpointActionLog(JSC::ExecState&, const String&) final;
</ins><span class="cx">
</span><span class="cx"> Inspector::InjectedScript injectedScriptForEval(ErrorString&, const int* executionContextId) override;
</span><del>- void setOverlayMessage(ErrorString&, const String*) override;
</del><ins>+ void setOverlayMessage(ErrorString&, const String*) final;
</ins><span class="cx">
</span><span class="cx"> Page& m_page;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-04-15 Darin Adler <darin@apple.com>
+
+ Reduce use of Deprecated::ScriptXXX classes
+ https://bugs.webkit.org/show_bug.cgi?id=156632
+
+ Reviewed by Alex Christensen.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Use references instead
+ of pointers.
+ (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]): Updated
+ since return value is a JSValue.
+ * WebView/WebView.mm:
+ (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
+
</ins><span class="cx"> 2016-04-14 Brent Fulgham <bfulgham@apple.com>
</span><span class="cx">
</span><span class="cx"> Make <a download> a runtime enabled option
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFramemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrame.mm        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -681,7 +681,7 @@
</span><span class="cx"> JSC::JSLockHolder jscLock(exec);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- JSC::JSValue result = _private->coreFrame->script().executeScript(string, forceUserGesture).jsValue();
</del><ins>+ JSC::JSValue result = _private->coreFrame->script().executeScript(string, forceUserGesture);
</ins><span class="cx">
</span><span class="cx"> if (!_private->coreFrame) // In case the script removed our frame from the page.
</span><span class="cx"> return @"";
</span><span class="lines">@@ -2107,7 +2107,7 @@
</span><span class="cx"> ASSERT(frame->document());
</span><span class="cx"> RetainPtr<WebFrame> webFrame(kit(frame)); // Running arbitrary JavaScript can destroy the frame.
</span><span class="cx">
</span><del>- JSC::JSValue result = frame->script().executeScriptInWorld(*core(world), string, true).jsValue();
</del><ins>+ JSC::JSValue result = frame->script().executeScriptInWorld(*core(world), string, true);
</ins><span class="cx">
</span><span class="cx"> if (!webFrame->_private->coreFrame) // In case the script removed our frame from the page.
</span><span class="cx"> return @"";
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -6921,7 +6921,7 @@
</span><span class="cx"> return nil;
</span><span class="cx"> if (!coreFrame->document())
</span><span class="cx"> return nil;
</span><del>- JSC::JSValue result = coreFrame->script().executeScript(script, true).jsValue();
</del><ins>+ JSC::JSValue result = coreFrame->script().executeScript(script, true);
</ins><span class="cx"> if (!result) // FIXME: pass errors
</span><span class="cx"> return 0;
</span><span class="cx"> JSLockHolder lock(coreFrame->script().globalObject(mainThreadNormalWorld())->globalExec());
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebKit/win/ChangeLog        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-04-15 Darin Adler <darin@apple.com>
+
+ Reduce use of Deprecated::ScriptXXX classes
+ https://bugs.webkit.org/show_bug.cgi?id=156632
+
+ Reviewed by Alex Christensen.
+
+ * Plugins/PluginView.cpp:
+ (WebCore::PluginView::performRequest): Use JSValue.
+ * WebFrame.cpp:
+ (WebFrame::stringByEvaluatingJavaScriptInScriptWorld): Ditto.
+ * WebView.cpp:
+ (WebView::stringByEvaluatingJavaScriptFromString): Ditto.
+
</ins><span class="cx"> 2016-04-11 Darin Adler <darin@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove UsePointersEvenForNonNullableObjectArguments from HTMLSelectElement
</span></span></pre></div>
<a id="trunkSourceWebKitwinPluginsPluginViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Plugins/PluginView.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Plugins/PluginView.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebKit/win/Plugins/PluginView.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -439,15 +439,17 @@
</span><span class="cx">
</span><span class="cx"> // Executing a script can cause the plugin view to be destroyed, so we keep a reference to it.
</span><span class="cx"> RefPtr<PluginView> protector(this);
</span><del>- Deprecated::ScriptValue result = m_parentFrame->script().executeScript(jsString, request->shouldAllowPopups());
</del><ins>+ auto result = m_parentFrame->script().executeScript(jsString, request->shouldAllowPopups());
</ins><span class="cx">
</span><span class="cx"> if (targetFrameName.isNull()) {
</span><del>- String resultString;
-
- JSC::ExecState* scriptState = m_parentFrame->script().globalObject(pluginWorld())->globalExec();
</del><span class="cx"> CString cstr;
</span><del>- if (result.getString(scriptState, resultString))
- cstr = resultString.utf8();
</del><ins>+ {
+ JSC::ExecState& state = *m_parentFrame->script().globalObject(pluginWorld())->globalExec();
+ JSC::JSLockHolder lock(&state);
+ String resultString;
+ if (result && result.getString(&state, resultString))
+ cstr = resultString.utf8();
+ }
</ins><span class="cx">
</span><span class="cx"> RefPtr<PluginStream> stream = PluginStream::create(this, m_parentFrame.get(), request->frameLoadRequest().resourceRequest(), request->sendNotification(), request->notifyData(), plugin()->pluginFuncs(), instance(), m_plugin->quirks());
</span><span class="cx"> m_streams.add(stream);
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebFrame.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebFrame.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebKit/win/WebFrame.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -2006,7 +2006,7 @@
</span><span class="cx"> // Get the frame frome the global object we've settled on.
</span><span class="cx"> Frame* frame = anyWorldGlobalObject->wrapped().frame();
</span><span class="cx"> ASSERT(frame->document());
</span><del>- JSValue result = frame->script().executeScriptInWorld(world->world(), string, true).jsValue();
</del><ins>+ JSValue result = frame->script().executeScriptInWorld(world->world(), string, true);
</ins><span class="cx">
</span><span class="cx"> if (!frame) // In case the script removed our frame from the page.
</span><span class="cx"> return S_OK;
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebKit/win/WebView.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -3505,7 +3505,7 @@
</span><span class="cx"> if (!coreFrame)
</span><span class="cx"> return E_UNEXPECTED;
</span><span class="cx">
</span><del>- JSC::JSValue scriptExecutionResult = coreFrame->script().executeScript(WTF::String(script), true).jsValue();
</del><ins>+ auto scriptExecutionResult = coreFrame->script().executeScript(WTF::String(script), true);
</ins><span class="cx"> if (!scriptExecutionResult)
</span><span class="cx"> return E_FAIL;
</span><span class="cx"> else if (scriptExecutionResult.isString()) {
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebKit2/ChangeLog        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-04-15 Darin Adler <darin@apple.com>
+
+ Reduce use of Deprecated::ScriptXXX classes
+ https://bugs.webkit.org/show_bug.cgi?id=156632
+
+ Reviewed by Alex Christensen.
+
+ * WebProcess/Plugins/PluginView.cpp:
+ (WebKit::PluginView::performJavaScriptURLRequest): Use JSValue.
+ * WebProcess/WebPage/WebInspectorUI.cpp:
+ (WebKit::WebInspectorUI::windowObjectCleared): Use references.
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::runJavaScriptInMainFrame): Use JSValue.
+
</ins><span class="cx"> 2016-04-15 Jer Noble <jer.noble@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION( r199603): Pandora crashes WebKit in WebPlaybackSessionManager::removeClientForContext
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPluginViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -1266,8 +1266,11 @@
</span><span class="cx"> // Evaluate the JavaScript code. Note that running JavaScript here could cause the plug-in to be destroyed, so we
</span><span class="cx"> // grab references to the plug-in here.
</span><span class="cx"> RefPtr<Plugin> plugin = m_plugin;
</span><del>- Deprecated::ScriptValue result = frame->script().executeScript(jsString, request->allowPopups());
</del><ins>+ auto result = frame->script().executeScript(jsString, request->allowPopups());
</ins><span class="cx">
</span><ins>+ if (!result)
+ return;
+
</ins><span class="cx"> // Check if evaluating the JavaScript destroyed the plug-in.
</span><span class="cx"> if (!plugin->controller())
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebInspectorUIcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> m_frontendHost->disconnectClient();
</span><span class="cx">
</span><span class="cx"> m_frontendHost = InspectorFrontendHost::create(this, m_page.corePage());
</span><del>- ScriptGlobalObject::set(execStateFromPage(mainThreadNormalWorld(), m_page.corePage()), ASCIILiteral("InspectorFrontendHost"), m_frontendHost.get());
</del><ins>+ ScriptGlobalObject::set(*execStateFromPage(mainThreadNormalWorld(), m_page.corePage()), ASCIILiteral("InspectorFrontendHost"), *m_frontendHost);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebInspectorUI::frontendLoaded()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (199618 => 199619)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-04-16 01:47:46 UTC (rev 199618)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-04-16 02:25:56 UTC (rev 199619)
</span><span class="lines">@@ -2656,7 +2656,7 @@
</span><span class="cx"> JSLockHolder lock(JSDOMWindow::commonVM());
</span><span class="cx"> bool hadException = true;
</span><span class="cx"> ExceptionDetails details;
</span><del>- if (JSValue resultValue = m_mainFrame->coreFrame()->script().executeScript(script, true, &details).jsValue()) {
</del><ins>+ if (JSValue resultValue = m_mainFrame->coreFrame()->script().executeScript(script, true, &details)) {
</ins><span class="cx"> hadException = false;
</span><span class="cx"> serializedResultValue = SerializedScriptValue::create(m_mainFrame->jsContext(),
</span><span class="cx"> toRef(m_mainFrame->coreFrame()->script().globalObject(mainThreadNormalWorld())->globalExec(), resultValue), nullptr);
</span></span></pre>
</div>
</div>
</body>
</html>