<!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>[200350] trunk</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/200350">200350</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-05-02 17:51:24 -0700 (Mon, 02 May 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make console a namespace object (like Math/JSON), allowing functions to be called unbound
https://bugs.webkit.org/show_bug.cgi?id=157286
<rdar://problem/26052830>
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-05-02
Reviewed by Timothy Hatcher.
Source/JavaScriptCore:
This changes `console` to be a global namespace object, like `Math` and `JSON`.
It just holds a bunch of functions, that can be used on their own, unbound.
For example, `[1,2,3].forEach(console.log)` and `var log = console.log; log(1)`
used to throw exceptions and now do not.
Previously console was an Object/Prototype pair, so functions were on
ConsolePrototype (console.__proto__.log) and they needed to be called
Console objects as the `this` value. Now, `console` is just a standard
object with a bunch of functions. Since there is no console prototype the
functions can be passed around and called as expected and they will
just do the right thing.
For compatability with other browsers, `console` was made enumerable
on the global object.
* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
Add new files and remove old files.
* runtime/CommonIdentifiers.h:
Add "console".
* runtime/ConsoleObject.cpp: Renamed from Source/JavaScriptCore/runtime/ConsolePrototype.cpp.
(JSC::ConsoleObject::ConsoleObject):
(JSC::ConsoleObject::finishCreation):
(JSC::valueToStringWithUndefinedOrNullCheck):
(JSC::consoleLogWithLevel):
(JSC::consoleProtoFuncDebug):
(JSC::consoleProtoFuncError):
(JSC::consoleProtoFuncLog):
(JSC::consoleProtoFuncInfo):
(JSC::consoleProtoFuncWarn):
(JSC::consoleProtoFuncClear):
(JSC::consoleProtoFuncDir):
(JSC::consoleProtoFuncDirXML):
(JSC::consoleProtoFuncTable):
(JSC::consoleProtoFuncTrace):
(JSC::consoleProtoFuncAssert):
(JSC::consoleProtoFuncCount):
(JSC::consoleProtoFuncProfile):
(JSC::consoleProtoFuncProfileEnd):
(JSC::consoleProtoFuncTakeHeapSnapshot):
(JSC::consoleProtoFuncTime):
(JSC::consoleProtoFuncTimeEnd):
(JSC::consoleProtoFuncTimeStamp):
(JSC::consoleProtoFuncGroup):
(JSC::consoleProtoFuncGroupCollapsed):
(JSC::consoleProtoFuncGroupEnd):
Console functions no longer need to check if the this object is
a Console object. They will always just work now.
* runtime/MathObject.cpp:
* runtime/MathObject.h:
* runtime/ConsoleObject.h: Renamed from Source/JavaScriptCore/runtime/ConsolePrototype.h.
(JSC::ConsoleObject::create):
(JSC::ConsoleObject::createStructure):
ConsoleObject is a basic object like MathObject.
* runtime/JSConsole.cpp: Removed.
* runtime/JSConsole.h: Removed.
* runtime/JSGlobalObject.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
Remove JSConsole / ConsolePrototype in favor of the single ConsoleObject.
LayoutTests:
* js/console-expected.txt: Added.
* js/console.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonIdentifiersh">trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjecth">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeMathObjectcpp">trunk/Source/JavaScriptCore/runtime/MathObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeMathObjecth">trunk/Source/JavaScriptCore/runtime/MathObject.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsjsconsoleexpectedtxt">trunk/LayoutTests/js/console-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsconsolehtml">trunk/LayoutTests/js/console.html</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeConsoleObjectcpp">trunk/Source/JavaScriptCore/runtime/ConsoleObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeConsoleObjecth">trunk/Source/JavaScriptCore/runtime/ConsoleObject.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreruntimeConsolePrototypecpp">trunk/Source/JavaScriptCore/runtime/ConsolePrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeConsolePrototypeh">trunk/Source/JavaScriptCore/runtime/ConsolePrototype.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSConsolecpp">trunk/Source/JavaScriptCore/runtime/JSConsole.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSConsoleh">trunk/Source/JavaScriptCore/runtime/JSConsole.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (200349 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-05-03 00:11:00 UTC (rev 200349)
+++ trunk/LayoutTests/ChangeLog        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-05-02 Joseph Pecoraro <pecoraro@apple.com>
+
+ Make console a namespace object (like Math/JSON), allowing functions to be called unbound
+ https://bugs.webkit.org/show_bug.cgi?id=157286
+ <rdar://problem/26052830>
+
+ Reviewed by Timothy Hatcher.
+
+ * js/console-expected.txt: Added.
+ * js/console.html: Added.
+
</ins><span class="cx"> 2016-05-02 Antti Koivisto <antti@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION(r199964): Animation on pseudo elements doesn't trigger if first frame matches the current style
</span></span></pre></div>
<a id="trunkLayoutTestsjsconsoleexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/console-expected.txt (0 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/console-expected.txt         (rev 0)
+++ trunk/LayoutTests/js/console-expected.txt        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -0,0 +1,170 @@
</span><ins>+CONSOLE MESSAGE: line 19: log message
+CONSOLE MESSAGE: line 20: log message
+CONSOLE MESSAGE: line 21: log message
+CONSOLE MESSAGE: line 22: log message
+CONSOLE MESSAGE: line 23: log message
+CONSOLE MESSAGE: line 24: log message
+CONSOLE MESSAGE: line 26: log message
+CONSOLE MESSAGE: line 1: 1
+CONSOLE MESSAGE: line 1: 2
+CONSOLE MESSAGE: line 1: 3
+PASS typeof console is "object"
+PASS console.toString() is "[object Console]"
+PASS Object.getPrototypeOf(console) is Object.getPrototypeOf({})
+PASS console is console
+PASS consoleDescriptor.configurable is true
+PASS consoleDescriptor.writable is true
+PASS consoleDescriptor.enumerable is true
+
+console.debug
+PASS typeof console.debug is "function"
+PASS console.debug.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.error
+PASS typeof console.error is "function"
+PASS console.error.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.log
+PASS typeof console.log is "function"
+PASS console.log.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.info
+PASS typeof console.info is "function"
+PASS console.info.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.warn
+PASS typeof console.warn is "function"
+PASS console.warn.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.clear
+PASS typeof console.clear is "function"
+PASS console.clear.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.dir
+PASS typeof console.dir is "function"
+PASS console.dir.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.dirxml
+PASS typeof console.dirxml is "function"
+PASS console.dirxml.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.table
+PASS typeof console.table is "function"
+PASS console.table.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.trace
+PASS typeof console.trace is "function"
+PASS console.trace.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.assert
+PASS typeof console.assert is "function"
+PASS console.assert.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.count
+PASS typeof console.count is "function"
+PASS console.count.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.profile
+PASS typeof console.profile is "function"
+PASS console.profile.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.profileEnd
+PASS typeof console.profileEnd is "function"
+PASS console.profileEnd.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.time
+PASS typeof console.time is "function"
+PASS console.time.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.timeEnd
+PASS typeof console.timeEnd is "function"
+PASS console.timeEnd.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.timeStamp
+PASS typeof console.timeStamp is "function"
+PASS console.timeStamp.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.takeHeapSnapshot
+PASS typeof console.takeHeapSnapshot is "function"
+PASS console.takeHeapSnapshot.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.group
+PASS typeof console.group is "function"
+PASS console.group.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.groupCollapsed
+PASS typeof console.groupCollapsed is "function"
+PASS console.groupCollapsed.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+console.groupEnd
+PASS typeof console.groupEnd is "function"
+PASS console.groupEnd.length is 0
+PASS descriptor.configurable is true
+PASS descriptor.writable is true
+PASS descriptor.enumerable is true
+
+PASS Object.getOwnPropertyNames(console).length is enumerablePropertyCount
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsconsolehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/console.html (0 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/console.html         (rev 0)
+++ trunk/LayoutTests/js/console.html        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+shouldBeEqualToString("typeof console", "object");
+shouldBeEqualToString("console.toString()", "[object Console]");
+shouldBe("Object.getPrototypeOf(console)", "Object.getPrototypeOf({})");
+shouldBe("console", "console");
+
+var consoleDescriptor = Object.getOwnPropertyDescriptor(window, "console");
+shouldBeTrue('consoleDescriptor.configurable');
+shouldBeTrue('consoleDescriptor.writable');
+shouldBeTrue('consoleDescriptor.enumerable');
+
+// Console methods don't care what their this object is.
+console.log("log message");
+console.log.call(null, "log message");
+console.log.call(undefined, "log message");
+console.log.call(console, "log message");
+console.log.call(123, "log message");
+console.log.call("ignore", "log message");
+console.log.bind(console, "log message");
+console.log.bind(console)("log message");
+[1,2,3].forEach(console.log);
+
+// All properties should be enumerable.
+var property, descriptor;
+var enumerablePropertyCount = 0;
+for (property in console) {
+ enumerablePropertyCount++;
+ descriptor = Object.getOwnPropertyDescriptor(console, property);
+
+ debug("");
+ debug(`console.${property}`);
+ shouldBeEqualToString(`typeof console.${property}`, "function");
+ shouldBe(`console.${property}.length`, '0');
+ shouldBeTrue('descriptor.configurable');
+ shouldBeTrue('descriptor.writable');
+ shouldBeTrue('descriptor.enumerable');
+}
+
+debug("");
+shouldBe("Object.getOwnPropertyNames(console).length", "enumerablePropertyCount");
+</script>
+<script src="../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (200349 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2016-05-03 00:11:00 UTC (rev 200349)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -625,7 +625,7 @@
</span><span class="cx"> runtime/CompilationResult.cpp
</span><span class="cx"> runtime/Completion.cpp
</span><span class="cx"> runtime/ConsoleClient.cpp
</span><del>- runtime/ConsolePrototype.cpp
</del><ins>+ runtime/ConsoleObject.cpp
</ins><span class="cx"> runtime/ConstantMode.cpp
</span><span class="cx"> runtime/ConstructData.cpp
</span><span class="cx"> runtime/ControlFlowProfiler.cpp
</span><span class="lines">@@ -690,7 +690,6 @@
</span><span class="cx"> runtime/JSCJSValue.cpp
</span><span class="cx"> runtime/JSCallee.cpp
</span><span class="cx"> runtime/JSCell.cpp
</span><del>- runtime/JSConsole.cpp
</del><span class="cx"> runtime/JSDataView.cpp
</span><span class="cx"> runtime/JSDataViewPrototype.cpp
</span><span class="cx"> runtime/JSDateMath.cpp
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (200349 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-05-03 00:11:00 UTC (rev 200349)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -1,3 +1,77 @@
</span><ins>+2016-05-02 Joseph Pecoraro <pecoraro@apple.com>
+
+ Make console a namespace object (like Math/JSON), allowing functions to be called unbound
+ https://bugs.webkit.org/show_bug.cgi?id=157286
+ <rdar://problem/26052830>
+
+ Reviewed by Timothy Hatcher.
+
+ This changes `console` to be a global namespace object, like `Math` and `JSON`.
+ It just holds a bunch of functions, that can be used on their own, unbound.
+ For example, `[1,2,3].forEach(console.log)` and `var log = console.log; log(1)`
+ used to throw exceptions and now do not.
+
+ Previously console was an Object/Prototype pair, so functions were on
+ ConsolePrototype (console.__proto__.log) and they needed to be called
+ Console objects as the `this` value. Now, `console` is just a standard
+ object with a bunch of functions. Since there is no console prototype the
+ functions can be passed around and called as expected and they will
+ just do the right thing.
+
+ For compatability with other browsers, `console` was made enumerable
+ on the global object.
+
+ * CMakeLists.txt:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ Add new files and remove old files.
+
+ * runtime/CommonIdentifiers.h:
+ Add "console".
+
+ * runtime/ConsoleObject.cpp: Renamed from Source/JavaScriptCore/runtime/ConsolePrototype.cpp.
+ (JSC::ConsoleObject::ConsoleObject):
+ (JSC::ConsoleObject::finishCreation):
+ (JSC::valueToStringWithUndefinedOrNullCheck):
+ (JSC::consoleLogWithLevel):
+ (JSC::consoleProtoFuncDebug):
+ (JSC::consoleProtoFuncError):
+ (JSC::consoleProtoFuncLog):
+ (JSC::consoleProtoFuncInfo):
+ (JSC::consoleProtoFuncWarn):
+ (JSC::consoleProtoFuncClear):
+ (JSC::consoleProtoFuncDir):
+ (JSC::consoleProtoFuncDirXML):
+ (JSC::consoleProtoFuncTable):
+ (JSC::consoleProtoFuncTrace):
+ (JSC::consoleProtoFuncAssert):
+ (JSC::consoleProtoFuncCount):
+ (JSC::consoleProtoFuncProfile):
+ (JSC::consoleProtoFuncProfileEnd):
+ (JSC::consoleProtoFuncTakeHeapSnapshot):
+ (JSC::consoleProtoFuncTime):
+ (JSC::consoleProtoFuncTimeEnd):
+ (JSC::consoleProtoFuncTimeStamp):
+ (JSC::consoleProtoFuncGroup):
+ (JSC::consoleProtoFuncGroupCollapsed):
+ (JSC::consoleProtoFuncGroupEnd):
+ Console functions no longer need to check if the this object is
+ a Console object. They will always just work now.
+
+ * runtime/MathObject.cpp:
+ * runtime/MathObject.h:
+ * runtime/ConsoleObject.h: Renamed from Source/JavaScriptCore/runtime/ConsolePrototype.h.
+ (JSC::ConsoleObject::create):
+ (JSC::ConsoleObject::createStructure):
+ ConsoleObject is a basic object like MathObject.
+
+ * runtime/JSConsole.cpp: Removed.
+ * runtime/JSConsole.h: Removed.
+ * runtime/JSGlobalObject.h:
+ * runtime/JSGlobalObject.cpp:
+ (JSC::JSGlobalObject::init):
+ (JSC::JSGlobalObject::visitChildren):
+ Remove JSConsole / ConsolePrototype in favor of the single ConsoleObject.
+
</ins><span class="cx"> 2016-05-02 Per Arne Vollan <peavo@outlook.com>
</span><span class="cx">
</span><span class="cx"> [Win] Clean up annoying compiler warnings
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (200349 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2016-05-03 00:11:00 UTC (rev 200349)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -1568,10 +1568,6 @@
</span><span class="cx">                 A5339EC91BB4B4600054F005 /* HeapObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = A5339EC81BB4B4510054F005 /* HeapObserver.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A5398FAB1C750DA40060A963 /* HeapProfiler.h in Headers */ = {isa = PBXBuildFile; fileRef = A5398FAA1C750D950060A963 /* HeapProfiler.h */; };
</span><span class="cx">                 A5398FAC1C750DA60060A963 /* HeapProfiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5398FA91C750D950060A963 /* HeapProfiler.cpp */; };
</span><del>-                A53CE08518BC1A5600BEDF76 /* ConsolePrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A53CE08118BC1A5600BEDF76 /* ConsolePrototype.cpp */; };
-                A53CE08618BC1A5600BEDF76 /* ConsolePrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = A53CE08218BC1A5600BEDF76 /* ConsolePrototype.h */; };
-                A53CE08718BC1A5600BEDF76 /* JSConsole.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A53CE08318BC1A5600BEDF76 /* JSConsole.cpp */; };
-                A53CE08818BC1A5600BEDF76 /* JSConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = A53CE08418BC1A5600BEDF76 /* JSConsole.h */; };
</del><span class="cx">                 A53CE08A18BC21C300BEDF76 /* ConsoleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A53CE08918BC21C300BEDF76 /* ConsoleClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A53F1AC018C90F8F0072EB6D /* framework.sb in Resources */ = {isa = PBXBuildFile; fileRef = A53F1ABE18C90EC70072EB6D /* framework.sb */; };
</span><span class="cx">                 A54982031891D0B00081E5B8 /* EventLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A54982011891D0B00081E5B8 /* EventLoop.cpp */; };
</span><span class="lines">@@ -1589,6 +1585,8 @@
</span><span class="cx">                 A55165D51BDF135A003B75C1 /* ScriptProfilingScope.h in Headers */ = {isa = PBXBuildFile; fileRef = A55165D41BDF134D003B75C1 /* ScriptProfilingScope.h */; };
</span><span class="cx">                 A552C37F1ADDB8FE00139726 /* JSRemoteInspector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A552C37D1ADDB8FE00139726 /* JSRemoteInspector.cpp */; };
</span><span class="cx">                 A552C3801ADDB8FE00139726 /* JSRemoteInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = A552C37E1ADDB8FE00139726 /* JSRemoteInspector.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                A55714BE1CD8049F0004D2C6 /* ConsoleObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A55714BD1CD8048E0004D2C6 /* ConsoleObject.h */; };
+                A55714BF1CD804A40004D2C6 /* ConsoleObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A55714BC1CD8048E0004D2C6 /* ConsoleObject.cpp */; };
</ins><span class="cx">                 A55D93A5185012A800400DED /* ScriptFunctionCall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A55D93A3185012A800400DED /* ScriptFunctionCall.cpp */; };
</span><span class="cx">                 A55D93A6185012A800400DED /* ScriptFunctionCall.h in Headers */ = {isa = PBXBuildFile; fileRef = A55D93A4185012A800400DED /* ScriptFunctionCall.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A55D93AC18514F7900400DED /* InspectorProtocolTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = A55D93AB18514F7900400DED /* InspectorProtocolTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -3789,10 +3787,6 @@
</span><span class="cx">                 A5339EC81BB4B4510054F005 /* HeapObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapObserver.h; sourceTree = "<group>"; };
</span><span class="cx">                 A5398FA91C750D950060A963 /* HeapProfiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HeapProfiler.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 A5398FAA1C750D950060A963 /* HeapProfiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapProfiler.h; sourceTree = "<group>"; };
</span><del>-                A53CE08118BC1A5600BEDF76 /* ConsolePrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConsolePrototype.cpp; sourceTree = "<group>"; };
-                A53CE08218BC1A5600BEDF76 /* ConsolePrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsolePrototype.h; sourceTree = "<group>"; };
-                A53CE08318BC1A5600BEDF76 /* JSConsole.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSConsole.cpp; sourceTree = "<group>"; };
-                A53CE08418BC1A5600BEDF76 /* JSConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSConsole.h; sourceTree = "<group>"; };
</del><span class="cx">                 A53CE08918BC21C300BEDF76 /* ConsoleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleClient.h; sourceTree = "<group>"; };
</span><span class="cx">                 A53F1ABE18C90EC70072EB6D /* framework.sb */ = {isa = PBXFileReference; lastKnownFileType = text; path = framework.sb; sourceTree = "<group>"; };
</span><span class="cx">                 A54982011891D0B00081E5B8 /* EventLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventLoop.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -3808,6 +3802,8 @@
</span><span class="cx">                 A55165D41BDF134D003B75C1 /* ScriptProfilingScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptProfilingScope.h; sourceTree = "<group>"; };
</span><span class="cx">                 A552C37D1ADDB8FE00139726 /* JSRemoteInspector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRemoteInspector.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 A552C37E1ADDB8FE00139726 /* JSRemoteInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRemoteInspector.h; sourceTree = "<group>"; };
</span><ins>+                A55714BC1CD8048E0004D2C6 /* ConsoleObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConsoleObject.cpp; sourceTree = "<group>"; };
+                A55714BD1CD8048E0004D2C6 /* ConsoleObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleObject.h; sourceTree = "<group>"; };
</ins><span class="cx">                 A55D93A3185012A800400DED /* ScriptFunctionCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptFunctionCall.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 A55D93A4185012A800400DED /* ScriptFunctionCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptFunctionCall.h; sourceTree = "<group>"; };
</span><span class="cx">                 A55D93AB18514F7900400DED /* InspectorProtocolTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorProtocolTypes.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -5554,8 +5550,8 @@
</span><span class="cx">                                 0FDB2CE9174896C7007B3C1B /* ConcurrentJITLock.h */,
</span><span class="cx">                                 A5B6A74C18C6DBA600F11E91 /* ConsoleClient.cpp */,
</span><span class="cx">                                 A53CE08918BC21C300BEDF76 /* ConsoleClient.h */,
</span><del>-                                A53CE08118BC1A5600BEDF76 /* ConsolePrototype.cpp */,
-                                A53CE08218BC1A5600BEDF76 /* ConsolePrototype.h */,
</del><ins>+                                A55714BC1CD8048E0004D2C6 /* ConsoleObject.cpp */,
+                                A55714BD1CD8048E0004D2C6 /* ConsoleObject.h */,
</ins><span class="cx">                                 A5FD0071189B038C00633231 /* ConsoleTypes.h */,
</span><span class="cx">                                 0F978B3A1AAEA71D007C7369 /* ConstantMode.cpp */,
</span><span class="cx">                                 0FFC99D0184EC8AD009C10AB /* ConstantMode.h */,
</span><span class="lines">@@ -5706,8 +5702,6 @@
</span><span class="cx">                                 F692A8870255597D01FF60F7 /* JSCJSValue.cpp */,
</span><span class="cx">                                 14ABB36E099C076400E2A24F /* JSCJSValue.h */,
</span><span class="cx">                                 865A30F0135007E100CDB49E /* JSCJSValueInlines.h */,
</span><del>-                                A53CE08318BC1A5600BEDF76 /* JSConsole.cpp */,
-                                A53CE08418BC1A5600BEDF76 /* JSConsole.h */,
</del><span class="cx">                                 0F2B66BD17B6B5AB00A7AE3F /* JSDataView.cpp */,
</span><span class="cx">                                 0F2B66BE17B6B5AB00A7AE3F /* JSDataView.h */,
</span><span class="cx">                                 0F2B66BF17B6B5AB00A7AE3F /* JSDataViewPrototype.cpp */,
</span><span class="lines">@@ -7130,7 +7124,6 @@
</span><span class="cx">                                 144836E7132DA7BE005BE785 /* ConservativeRoots.h in Headers */,
</span><span class="cx">                                 A53CE08A18BC21C300BEDF76 /* ConsoleClient.h in Headers */,
</span><span class="cx">                                 A5FD007A189B051000633231 /* ConsoleMessage.h in Headers */,
</span><del>-                                A53CE08618BC1A5600BEDF76 /* ConsolePrototype.h in Headers */,
</del><span class="cx">                                 A5FD0074189B038C00633231 /* ConsoleTypes.h in Headers */,
</span><span class="cx">                                 0FFC99D1184EC8AD009C10AB /* ConstantMode.h in Headers */,
</span><span class="cx">                                 E354622B1B6065D100545386 /* ConstructAbility.h in Headers */,
</span><span class="lines">@@ -7581,6 +7574,7 @@
</span><span class="cx">                                 A5398FAB1C750DA40060A963 /* HeapProfiler.h in Headers */,
</span><span class="cx">                                 A1587D721B4DC14100D69849 /* IntlDateTimeFormatPrototype.h in Headers */,
</span><span class="cx">                                 A1587D761B4DC1C600D69849 /* IntlDateTimeFormatPrototype.lut.h in Headers */,
</span><ins>+                                A55714BE1CD8049F0004D2C6 /* ConsoleObject.h in Headers */,
</ins><span class="cx">                                 A1D792FD1B43864B004516F5 /* IntlNumberFormat.h in Headers */,
</span><span class="cx">                                 A1D792FF1B43864B004516F5 /* IntlNumberFormatConstructor.h in Headers */,
</span><span class="cx">                                 A125846E1B45A36000CC7F6C /* IntlNumberFormatConstructor.lut.h in Headers */,
</span><span class="lines">@@ -7636,7 +7630,6 @@
</span><span class="cx">                                 BC18C42B0E16F5CD00B34460 /* JSCJSValue.h in Headers */,
</span><span class="cx">                                 865A30F1135007E100CDB49E /* JSCJSValueInlines.h in Headers */,
</span><span class="cx">                                 BC18C41D0E16F5CD00B34460 /* JSClassRef.h in Headers */,
</span><del>-                                A53CE08818BC1A5600BEDF76 /* JSConsole.h in Headers */,
</del><span class="cx">                                 86E3C613167BABD7006D760A /* JSContext.h in Headers */,
</span><span class="cx">                                 86E3C617167BABEE006D760A /* JSContextInternal.h in Headers */,
</span><span class="cx">                                 A58C024218E4A41A00032BC5 /* JSContextPrivate.h in Headers */,
</span><span class="lines">@@ -8674,6 +8667,7 @@
</span><span class="cx">                                 0FEC851F1BDACDAC0080FF74 /* B3MemoryValue.cpp in Sources */,
</span><span class="cx">                                 0FEC85211BDACDAC0080FF74 /* B3Opcode.cpp in Sources */,
</span><span class="cx">                                 0FEC85231BDACDAC0080FF74 /* B3Origin.cpp in Sources */,
</span><ins>+                                A55714BF1CD804A40004D2C6 /* ConsoleObject.cpp in Sources */,
</ins><span class="cx">                                 0FEC85251BDACDAC0080FF74 /* B3PatchpointSpecial.cpp in Sources */,
</span><span class="cx">                                 0FEC85271BDACDAC0080FF74 /* B3PatchpointValue.cpp in Sources */,
</span><span class="cx">                                 0FEC85291BDACDAC0080FF74 /* B3PhaseScope.cpp in Sources */,
</span><span class="lines">@@ -8738,7 +8732,6 @@
</span><span class="cx">                                 146B16D812EB5B59001BEC1B /* ConservativeRoots.cpp in Sources */,
</span><span class="cx">                                 A5B6A74D18C6DBA600F11E91 /* ConsoleClient.cpp in Sources */,
</span><span class="cx">                                 A5FD0079189B051000633231 /* ConsoleMessage.cpp in Sources */,
</span><del>-                                A53CE08518BC1A5600BEDF76 /* ConsolePrototype.cpp in Sources */,
</del><span class="cx">                                 0F978B3B1AAEA71D007C7369 /* ConstantMode.cpp in Sources */,
</span><span class="cx">                                 1428082E107EC0570013E7B2 /* ConstructData.cpp in Sources */,
</span><span class="cx">                                 A57D23F11891B5B40031C7FA /* ContentSearchUtilities.cpp in Sources */,
</span><span class="lines">@@ -9092,7 +9085,6 @@
</span><span class="cx">                                 147F39D1107EC37600427A48 /* JSCell.cpp in Sources */,
</span><span class="cx">                                 147F39D6107EC37600427A48 /* JSCJSValue.cpp in Sources */,
</span><span class="cx">                                 1440FCE40A51E46B0005F061 /* JSClassRef.cpp in Sources */,
</span><del>-                                A53CE08718BC1A5600BEDF76 /* JSConsole.cpp in Sources */,
</del><span class="cx">                                 86E3C616167BABEE006D760A /* JSContext.mm in Sources */,
</span><span class="cx">                                 14BD5A300A3E91F600BAF59C /* JSContextRef.cpp in Sources */,
</span><span class="cx">                                 A72028B61797601E0098028C /* JSCTestRunnerUtils.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonIdentifiersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h (200349 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2016-05-03 00:11:00 UTC (rev 200349)
+++ trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -129,6 +129,7 @@
</span><span class="cx"> macro(compilations) \
</span><span class="cx"> macro(compile) \
</span><span class="cx"> macro(configurable) \
</span><ins>+ macro(console) \
</ins><span class="cx"> macro(constructor) \
</span><span class="cx"> macro(count) \
</span><span class="cx"> macro(counters) \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeConsoleObjectcppfromrev200347trunkSourceJavaScriptCoreruntimeConsolePrototypecpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/runtime/ConsoleObject.cpp (from rev 200347, trunk/Source/JavaScriptCore/runtime/ConsolePrototype.cpp) (0 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ConsoleObject.cpp         (rev 0)
+++ trunk/Source/JavaScriptCore/runtime/ConsoleObject.cpp        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -0,0 +1,362 @@
</span><ins>+/*
+ * Copyright (C) 2014-2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ConsoleObject.h"
+
+#include "ConsoleClient.h"
+#include "Error.h"
+#include "JSCInlines.h"
+#include "ScriptArguments.h"
+#include "ScriptCallStackFactory.h"
+
+namespace JSC {
+
+STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(ConsoleObject);
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncDebug(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncError(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncLog(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncInfo(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncWarn(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncClear(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncDir(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncDirXML(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTable(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTrace(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncAssert(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncCount(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncProfile(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncProfileEnd(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTakeHeapSnapshot(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTime(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeEnd(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeStamp(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncGroup(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncGroupCollapsed(ExecState*);
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncGroupEnd(ExecState*);
+
+const ClassInfo ConsoleObject::s_info = { "Console", &Base::s_info, 0, CREATE_METHOD_TABLE(ConsoleObject) };
+
+ConsoleObject::ConsoleObject(VM& vm, Structure* structure)
+ : JSNonFinalObject(vm, structure)
+{
+}
+
+void ConsoleObject::finishCreation(VM& vm, JSGlobalObject* globalObject)
+{
+ Base::finishCreation(vm);
+ ASSERT(inherits(info()));
+
+ // For legacy reasons, console properties are enumerable, writable, deleteable,
+ // and all have a length of 0. This may change if Console is standardized.
+
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("debug", consoleProtoFuncDebug, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("error", consoleProtoFuncError, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("log", consoleProtoFuncLog, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("info", consoleProtoFuncInfo, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("warn", consoleProtoFuncWarn, None, 0);
+
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->clear, consoleProtoFuncClear, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("dir", consoleProtoFuncDir, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("dirxml", consoleProtoFuncDirXML, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("table", consoleProtoFuncTable, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("trace", consoleProtoFuncTrace, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("assert", consoleProtoFuncAssert, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->count, consoleProtoFuncCount, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("profile", consoleProtoFuncProfile, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("profileEnd", consoleProtoFuncProfileEnd, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("time", consoleProtoFuncTime, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeEnd", consoleProtoFuncTimeEnd, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeStamp", consoleProtoFuncTimeStamp, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("takeHeapSnapshot", consoleProtoFuncTakeHeapSnapshot, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("group", consoleProtoFuncGroup, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("groupCollapsed", consoleProtoFuncGroupCollapsed, None, 0);
+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("groupEnd", consoleProtoFuncGroupEnd, None, 0);
+}
+
+static String valueToStringWithUndefinedOrNullCheck(ExecState* exec, JSValue value)
+{
+ if (value.isUndefinedOrNull())
+ return String();
+ return value.toString(exec)->value(exec);
+}
+
+static EncodedJSValue consoleLogWithLevel(ExecState* exec, MessageLevel level)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
+ client->logWithLevel(exec, arguments.release(), level);
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncDebug(ExecState* exec)
+{
+ return consoleLogWithLevel(exec, MessageLevel::Debug);
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncError(ExecState* exec)
+{
+ return consoleLogWithLevel(exec, MessageLevel::Error);
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncLog(ExecState* exec)
+{
+ return consoleLogWithLevel(exec, MessageLevel::Log);
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncInfo(ExecState* exec)
+{
+ return consoleLogWithLevel(exec, MessageLevel::Info);
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncWarn(ExecState* exec)
+{
+ return consoleLogWithLevel(exec, MessageLevel::Warning);
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncClear(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
+ client->clear(exec, arguments.release());
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncDir(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
+ client->dir(exec, arguments.release());
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncDirXML(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
+ client->dirXML(exec, arguments.release());
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTable(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
+ client->table(exec, arguments.release());
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTrace(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
+ client->trace(exec, arguments.release());
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncAssert(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ bool condition(exec->argument(0).toBoolean(exec));
+ if (exec->hadException())
+ return JSValue::encode(jsUndefined());
+
+ RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 1));
+ client->assertCondition(exec, arguments.release(), condition);
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncCount(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
+ client->count(exec, arguments.release());
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncProfile(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ size_t argsCount = exec->argumentCount();
+ if (!argsCount) {
+ client->profile(exec, String());
+ return JSValue::encode(jsUndefined());
+ }
+
+ const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
+ if (exec->hadException())
+ return JSValue::encode(jsUndefined());
+
+ client->profile(exec, title);
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncProfileEnd(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ size_t argsCount = exec->argumentCount();
+ if (!argsCount) {
+ client->profileEnd(exec, String());
+ return JSValue::encode(jsUndefined());
+ }
+
+ const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
+ if (exec->hadException())
+ return JSValue::encode(jsUndefined());
+
+ client->profileEnd(exec, title);
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTakeHeapSnapshot(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ size_t argsCount = exec->argumentCount();
+ if (!argsCount) {
+ client->takeHeapSnapshot(exec, String());
+ return JSValue::encode(jsUndefined());
+ }
+
+ const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
+ if (exec->hadException())
+ return JSValue::encode(jsUndefined());
+
+ client->takeHeapSnapshot(exec, title);
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTime(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createNotEnoughArgumentsError(exec));
+
+ const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
+ if (exec->hadException())
+ return JSValue::encode(jsUndefined());
+
+ client->time(exec, title);
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeEnd(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ if (exec->argumentCount() < 1)
+ return throwVMError(exec, createNotEnoughArgumentsError(exec));
+
+ const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
+ if (exec->hadException())
+ return JSValue::encode(jsUndefined());
+
+ client->timeEnd(exec, title);
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeStamp(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
+ client->timeStamp(exec, arguments.release());
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncGroup(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
+ client->group(exec, arguments.release());
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncGroupCollapsed(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
+ client->groupCollapsed(exec, arguments.release());
+ return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue JSC_HOST_CALL consoleProtoFuncGroupEnd(ExecState* exec)
+{
+ ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient();
+ if (!client)
+ return JSValue::encode(jsUndefined());
+
+ RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
+ client->groupEnd(exec, arguments.release());
+ return JSValue::encode(jsUndefined());
+}
+
+} // namespace JSC
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeConsoleObjecthfromrev200347trunkSourceJavaScriptCoreruntimeConsolePrototypeh"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/runtime/ConsoleObject.h (from rev 200347, trunk/Source/JavaScriptCore/runtime/ConsolePrototype.h) (0 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ConsoleObject.h         (rev 0)
+++ trunk/Source/JavaScriptCore/runtime/ConsoleObject.h        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+/*
+ * Copyright (C) 2014-2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "JSObject.h"
+
+namespace JSC {
+
+class ConsoleObject : public JSNonFinalObject {
+private:
+ ConsoleObject(VM&, Structure*);
+
+public:
+ typedef JSNonFinalObject Base;
+
+ static ConsoleObject* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
+ {
+ ConsoleObject* object = new (NotNull, allocateCell<ConsoleObject>(vm.heap)) ConsoleObject(vm, structure);
+ object->finishCreation(vm, globalObject);
+ return object;
+ }
+
+ DECLARE_INFO;
+
+ static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
+ {
+ return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
+ }
+
+protected:
+ void finishCreation(VM&, JSGlobalObject*);
+};
+
+} // namespace JSC
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeConsolePrototypecpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/runtime/ConsolePrototype.cpp (200349 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ConsolePrototype.cpp        2016-05-03 00:11:00 UTC (rev 200349)
+++ trunk/Source/JavaScriptCore/runtime/ConsolePrototype.cpp        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -1,426 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "ConsolePrototype.h"
-
-#include "ConsoleClient.h"
-#include "Error.h"
-#include "ExceptionHelpers.h"
-#include "JSCInlines.h"
-#include "JSConsole.h"
-#include "ScriptArguments.h"
-#include "ScriptCallStackFactory.h"
-
-namespace JSC {
-
-const ClassInfo ConsolePrototype::s_info = { "ConsolePrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(ConsolePrototype) };
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncDebug(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncError(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncLog(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncInfo(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncWarn(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncClear(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncDir(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncDirXML(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTable(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTrace(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncAssert(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncCount(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncProfile(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncProfileEnd(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTakeHeapSnapshot(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTime(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeEnd(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeStamp(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncGroup(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncGroupCollapsed(ExecState*);
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncGroupEnd(ExecState*);
-
-void ConsolePrototype::finishCreation(VM& vm, JSGlobalObject* globalObject)
-{
- Base::finishCreation(vm);
- ASSERT(inherits(info()));
- vm.prototypeMap.addPrototype(this);
-
- // For legacy reasons, console properties are enumerable, writable, deleteable,
- // and all have a length of 0. This may change if Console is standardized.
-
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("debug", consoleProtoFuncDebug, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("error", consoleProtoFuncError, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("log", consoleProtoFuncLog, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("info", consoleProtoFuncInfo, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("warn", consoleProtoFuncWarn, None, 0);
-
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("clear", consoleProtoFuncClear, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("dir", consoleProtoFuncDir, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("dirxml", consoleProtoFuncDirXML, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("table", consoleProtoFuncTable, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("trace", consoleProtoFuncTrace, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("assert", consoleProtoFuncAssert, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("count", consoleProtoFuncCount, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("profile", consoleProtoFuncProfile, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("profileEnd", consoleProtoFuncProfileEnd, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("time", consoleProtoFuncTime, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeEnd", consoleProtoFuncTimeEnd, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeStamp", consoleProtoFuncTimeStamp, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("takeHeapSnapshot", consoleProtoFuncTakeHeapSnapshot, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("group", consoleProtoFuncGroup, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("groupCollapsed", consoleProtoFuncGroupCollapsed, None, 0);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("groupEnd", consoleProtoFuncGroupEnd, None, 0);
-}
-
-static String valueToStringWithUndefinedOrNullCheck(ExecState* exec, JSValue value)
-{
- if (value.isUndefinedOrNull())
- return String();
- return value.toString(exec)->value(exec);
-}
-
-static EncodedJSValue consoleLogWithLevel(ExecState* exec, MessageLevel level)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
- client->logWithLevel(exec, arguments.release(), level);
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncDebug(ExecState* exec)
-{
- return consoleLogWithLevel(exec, MessageLevel::Debug);
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncError(ExecState* exec)
-{
- return consoleLogWithLevel(exec, MessageLevel::Error);
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncLog(ExecState* exec)
-{
- return consoleLogWithLevel(exec, MessageLevel::Log);
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncInfo(ExecState* exec)
-{
- return consoleLogWithLevel(exec, MessageLevel::Info);
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncWarn(ExecState* exec)
-{
- return consoleLogWithLevel(exec, MessageLevel::Warning);
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncClear(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
- client->clear(exec, arguments.release());
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncDir(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
- client->dir(exec, arguments.release());
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncDirXML(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
- client->dirXML(exec, arguments.release());
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTable(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
- client->table(exec, arguments.release());
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTrace(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
- client->trace(exec, arguments.release());
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncAssert(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- bool condition(exec->argument(0).toBoolean(exec));
- if (exec->hadException())
- return JSValue::encode(jsUndefined());
-
- RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 1));
- client->assertCondition(exec, arguments.release(), condition);
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncCount(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
- client->count(exec, arguments.release());
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncProfile(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- size_t argsCount = exec->argumentCount();
- if (!argsCount) {
- client->profile(exec, String());
- return JSValue::encode(jsUndefined());
- }
-
- const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
- if (exec->hadException())
- return JSValue::encode(jsUndefined());
-
- client->profile(exec, title);
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncProfileEnd(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- size_t argsCount = exec->argumentCount();
- if (!argsCount) {
- client->profileEnd(exec, String());
- return JSValue::encode(jsUndefined());
- }
-
- const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
- if (exec->hadException())
- return JSValue::encode(jsUndefined());
-
- client->profileEnd(exec, title);
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTakeHeapSnapshot(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- size_t argsCount = exec->argumentCount();
- if (!argsCount) {
- client->takeHeapSnapshot(exec, String());
- return JSValue::encode(jsUndefined());
- }
-
- const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
- if (exec->hadException())
- return JSValue::encode(jsUndefined());
-
- client->takeHeapSnapshot(exec, title);
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTime(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- if (exec->argumentCount() < 1)
- return throwVMError(exec, createNotEnoughArgumentsError(exec));
-
- const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
- if (exec->hadException())
- return JSValue::encode(jsUndefined());
-
- client->time(exec, title);
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeEnd(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- if (exec->argumentCount() < 1)
- return throwVMError(exec, createNotEnoughArgumentsError(exec));
-
- const String& title(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0)));
- if (exec->hadException())
- return JSValue::encode(jsUndefined());
-
- client->timeEnd(exec, title);
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeStamp(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
- client->timeStamp(exec, arguments.release());
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncGroup(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
- client->group(exec, arguments.release());
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncGroupCollapsed(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
- client->groupCollapsed(exec, arguments.release());
- return JSValue::encode(jsUndefined());
-}
-
-static EncodedJSValue JSC_HOST_CALL consoleProtoFuncGroupEnd(ExecState* exec)
-{
- JSConsole* castedThis = jsDynamicCast<JSConsole*>(exec->thisValue());
- if (!castedThis)
- return throwVMTypeError(exec);
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSConsole::info());
- ConsoleClient* client = castedThis->globalObject()->consoleClient();
- if (!client)
- return JSValue::encode(jsUndefined());
-
- RefPtr<Inspector::ScriptArguments> arguments(Inspector::createScriptArguments(exec, 0));
- client->groupEnd(exec, arguments.release());
- return JSValue::encode(jsUndefined());
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeConsolePrototypeh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/runtime/ConsolePrototype.h (200349 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ConsolePrototype.h        2016-05-03 00:11:00 UTC (rev 200349)
+++ trunk/Source/JavaScriptCore/runtime/ConsolePrototype.h        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -1,61 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ConsolePrototype_h
-#define ConsolePrototype_h
-
-#include "JSObject.h"
-
-namespace JSC {
-
-class ConsolePrototype : public JSNonFinalObject {
-public:
- typedef JSNonFinalObject Base;
-
- DECLARE_INFO;
-
- static ConsolePrototype* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
- {
- ConsolePrototype* prototype = new (NotNull, allocateCell<ConsolePrototype>(vm.heap)) ConsolePrototype(vm, structure);
- prototype->finishCreation(vm, globalObject);
- return prototype;
- }
-
- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
- {
- return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
- }
-
-private:
- ConsolePrototype(VM& vm, Structure* structure)
- : Base(vm, structure)
- {
- }
- void finishCreation(VM&, JSGlobalObject*);
-};
-
-}
-
-#endif // !defined(ConsolePrototype_h)
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSConsolecpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/runtime/JSConsole.cpp (200349 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSConsole.cpp        2016-05-03 00:11:00 UTC (rev 200349)
+++ trunk/Source/JavaScriptCore/runtime/JSConsole.cpp        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -1,36 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "JSConsole.h"
-
-#include "JSCJSValueInlines.h"
-#include "StructureInlines.h"
-
-namespace JSC {
-
-const ClassInfo JSConsole::s_info = { "Console", &Base::s_info, 0, CREATE_METHOD_TABLE(JSConsole) };
-
-}
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSConsoleh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/runtime/JSConsole.h (200349 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSConsole.h        2016-05-03 00:11:00 UTC (rev 200349)
+++ trunk/Source/JavaScriptCore/runtime/JSConsole.h        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -1,65 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef JSConsole_h
-#define JSConsole_h
-
-#include "JSObject.h"
-
-namespace JSC {
-
-class JSConsole : public JSNonFinalObject {
-public:
- typedef JSNonFinalObject Base;
-
- DECLARE_EXPORT_INFO;
-
- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
- {
- return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
- }
-
- static JSConsole* create(VM& vm, Structure* structure)
- {
- JSConsole* instance = new (NotNull, allocateCell<JSConsole>(vm.heap)) JSConsole(vm, structure);
- instance->finishCreation(vm);
- return instance;
- }
-
- static JSConsole* create(ExecState* exec, Structure* structure)
- {
- return create(exec->vm(), structure);
- }
-
-private:
- JSConsole(VM& vm, Structure* structure)
- : Base(vm, structure)
- {
- }
-};
-
-}
-
-#endif // !defined(JSConsole_h)
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp (200349 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2016-05-03 00:11:00 UTC (rev 200349)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> #include "ClonedArguments.h"
</span><span class="cx"> #include "CodeBlock.h"
</span><span class="cx"> #include "CodeCache.h"
</span><del>-#include "ConsolePrototype.h"
</del><ins>+#include "ConsoleObject.h"
</ins><span class="cx"> #include "DateConstructor.h"
</span><span class="cx"> #include "DatePrototype.h"
</span><span class="cx"> #include "Debugger.h"
</span><span class="lines">@@ -70,7 +70,6 @@
</span><span class="cx"> #include "JSCallbackConstructor.h"
</span><span class="cx"> #include "JSCallbackFunction.h"
</span><span class="cx"> #include "JSCallbackObject.h"
</span><del>-#include "JSConsole.h"
</del><span class="cx"> #include "JSDataView.h"
</span><span class="cx"> #include "JSDataViewPrototype.h"
</span><span class="cx"> #include "JSDollarVM.h"
</span><span class="lines">@@ -498,6 +497,8 @@
</span><span class="cx"> ReflectObject* reflectObject = ReflectObject::create(vm, this, ReflectObject::createStructure(vm, this, m_objectPrototype.get()));
</span><span class="cx"> putDirectWithoutTransition(vm, vm.propertyNames->Reflect, reflectObject, DontEnum);
</span><span class="cx">
</span><ins>+ putDirectWithoutTransition(vm, vm.propertyNames->console, ConsoleObject::create(vm, this, ConsoleObject::createStructure(vm, this, m_objectPrototype.get())));
+
</ins><span class="cx"> JSTypedArrayViewConstructor* typedArraySuperConstructor = JSTypedArrayViewConstructor::create(vm, this, JSTypedArrayViewConstructor::createStructure(vm, this, m_functionPrototype.get()), typedArrayProto, speciesGetterSetter);
</span><span class="cx"> typedArrayProto->putDirectWithoutTransition(vm, vm.propertyNames->constructor, typedArraySuperConstructor, DontEnum);
</span><span class="cx">
</span><span class="lines">@@ -673,11 +674,6 @@
</span><span class="cx">
</span><span class="cx"> m_linkTimeConstants[static_cast<unsigned>(LinkTimeConstant::DefinePropertyFunction)] = m_definePropertyFunction.get();
</span><span class="cx">
</span><del>- ConsolePrototype* consolePrototype = ConsolePrototype::create(vm, this, ConsolePrototype::createStructure(vm, this, m_objectPrototype.get()));
- m_consoleStructure.set(vm, this, JSConsole::createStructure(vm, this, consolePrototype));
- JSConsole* consoleObject = JSConsole::create(vm, m_consoleStructure.get());
- putDirectWithoutTransition(vm, Identifier::fromString(exec, "console"), consoleObject, DontEnum);
-
</del><span class="cx"> if (UNLIKELY(Options::useDollarVM())) {
</span><span class="cx"> JSDollarVMPrototype* dollarVMPrototype = JSDollarVMPrototype::create(vm, this, JSDollarVMPrototype::createStructure(vm, this, m_objectPrototype.get()));
</span><span class="cx"> m_dollarVMStructure.set(vm, this, JSDollarVM::createStructure(vm, this, dollarVMPrototype));
</span><span class="lines">@@ -1000,7 +996,6 @@
</span><span class="cx"> visitor.append(&thisObject->m_regExpMatchesArraySlowPutStructure);
</span><span class="cx"> visitor.append(&thisObject->m_moduleRecordStructure);
</span><span class="cx"> visitor.append(&thisObject->m_moduleNamespaceObjectStructure);
</span><del>- visitor.append(&thisObject->m_consoleStructure);
</del><span class="cx"> visitor.append(&thisObject->m_dollarVMStructure);
</span><span class="cx"> visitor.append(&thisObject->m_internalFunctionStructure);
</span><span class="cx"> visitor.append(&thisObject->m_proxyObjectStructure);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h (200349 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2016-05-03 00:11:00 UTC (rev 200349)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -281,7 +281,6 @@
</span><span class="cx"> WriteBarrier<Structure> m_privateNameStructure;
</span><span class="cx"> WriteBarrier<Structure> m_regExpStructure;
</span><span class="cx"> WriteBarrier<Structure> m_generatorFunctionStructure;
</span><del>- WriteBarrier<Structure> m_consoleStructure;
</del><span class="cx"> WriteBarrier<Structure> m_dollarVMStructure;
</span><span class="cx"> WriteBarrier<Structure> m_internalFunctionStructure;
</span><span class="cx"> WriteBarrier<Structure> m_iteratorResultObjectStructure;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeMathObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/MathObject.cpp (200349 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/MathObject.cpp        2016-05-03 00:11:00 UTC (rev 200349)
+++ trunk/Source/JavaScriptCore/runtime/MathObject.cpp        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -69,10 +69,6 @@
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL mathProtoFuncTanh(ExecState*);
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL mathProtoFuncIMul(ExecState*);
</span><span class="cx">
</span><del>-}
-
-namespace JSC {
-
</del><span class="cx"> const ClassInfo MathObject::s_info = { "Math", &Base::s_info, 0, CREATE_METHOD_TABLE(MathObject) };
</span><span class="cx">
</span><span class="cx"> MathObject::MathObject(VM& vm, Structure* structure)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeMathObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/MathObject.h (200349 => 200350)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/MathObject.h        2016-05-03 00:11:00 UTC (rev 200349)
+++ trunk/Source/JavaScriptCore/runtime/MathObject.h        2016-05-03 00:51:24 UTC (rev 200350)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx">
</span><span class="cx"> public:
</span><span class="cx"> typedef JSNonFinalObject Base;
</span><del>- static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
</del><span class="cx">
</span><span class="cx"> static MathObject* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
</span><span class="cx"> {
</span></span></pre>
</div>
</div>
</body>
</html>