<!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>[183575] 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/183575">183575</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2015-04-29 14:27:48 -0700 (Wed, 29 Apr 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>
Source/JavaScriptCore:
JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
https://bugs.webkit.org/show_bug.cgi?id=144397

Reviewed by Andreas Kling.
        
Add the flag to JSTypeInfo. It's an inline flag so that it's fast to query. Slap the flag on
callback objects and internal functions. Modify the TypeOf operation to use this flag to avoid
making a getCallData() call if it isn't necessary.

* API/JSCallbackObject.h:
* runtime/InternalFunction.h:
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::typeOfShouldCallGetCallData):
* runtime/Operations.cpp:
(JSC::jsTypeStringForValue):
* tests/stress/type-of-functions-and-objects.js: Added.
(foo):
(bar):
(baz):
(fuzz):
(expect):
(test):

Source/WebCore:
JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
https://bugs.webkit.org/show_bug.cgi?id=144397

Reviewed by Andreas Kling.

If you override getCallData() and you want to be called a &quot;function&quot;, then you need to use the
new TypeOfShouldCallGetCallData flag.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bridge/objc/objc_runtime.h:
* bridge/runtime_method.h:
* bridge/runtime_object.h:

Source/WebKit2:
JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
https://bugs.webkit.org/show_bug.cgi?id=144397

Reviewed by Andreas Kling.

If you override getCallData() and you want to be called a &quot;function&quot;, then you need to use the
new TypeOfShouldCallGetCallData flag.

* WebProcess/Plugins/Netscape/JSNPObject.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreAPIJSCallbackObjecth">trunk/Source/JavaScriptCore/API/JSCallbackObject.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeInternalFunctionh">trunk/Source/JavaScriptCore/runtime/InternalFunction.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSTypeInfoh">trunk/Source/JavaScriptCore/runtime/JSTypeInfo.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeOperationscpp">trunk/Source/JavaScriptCore/runtime/Operations.cpp</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebridgeobjcobjc_runtimeh">trunk/Source/WebCore/bridge/objc/objc_runtime.h</a></li>
<li><a href="#trunkSourceWebCorebridgeruntime_methodh">trunk/Source/WebCore/bridge/runtime_method.h</a></li>
<li><a href="#trunkSourceWebCorebridgeruntime_objecth">trunk/Source/WebCore/bridge/runtime_object.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsNetscapeJSNPObjecth">trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoretestsstresstypeoffunctionsandobjectsjs">trunk/Source/JavaScriptCore/tests/stress/type-of-functions-and-objects.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreAPIJSCallbackObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/API/JSCallbackObject.h (183574 => 183575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/API/JSCallbackObject.h        2015-04-29 20:50:29 UTC (rev 183574)
+++ trunk/Source/JavaScriptCore/API/JSCallbackObject.h        2015-04-29 21:27:48 UTC (rev 183575)
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx"> 
</span><span class="cx"> public:
</span><span class="cx">     typedef Parent Base;
</span><del>-    static const unsigned StructureFlags = Base::StructureFlags | ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | ImplementsHasInstance | OverridesHasInstance | OverridesGetPropertyNames;
</del><ins>+    static const unsigned StructureFlags = Base::StructureFlags | ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | ImplementsHasInstance | OverridesHasInstance | OverridesGetPropertyNames | TypeOfShouldCallGetCallData;
</ins><span class="cx"> 
</span><span class="cx">     ~JSCallbackObject();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (183574 => 183575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-04-29 20:50:29 UTC (rev 183574)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-04-29 21:27:48 UTC (rev 183575)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2015-04-29  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
+        https://bugs.webkit.org/show_bug.cgi?id=144397
+
+        Reviewed by Andreas Kling.
+        
+        Add the flag to JSTypeInfo. It's an inline flag so that it's fast to query. Slap the flag on
+        callback objects and internal functions. Modify the TypeOf operation to use this flag to avoid
+        making a getCallData() call if it isn't necessary.
+
+        * API/JSCallbackObject.h:
+        * runtime/InternalFunction.h:
+        * runtime/JSTypeInfo.h:
+        (JSC::TypeInfo::typeOfShouldCallGetCallData):
+        * runtime/Operations.cpp:
+        (JSC::jsTypeStringForValue):
+        * tests/stress/type-of-functions-and-objects.js: Added.
+        (foo):
+        (bar):
+        (baz):
+        (fuzz):
+        (expect):
+        (test):
+
</ins><span class="cx"> 2015-04-28  Geoffrey Garen  &lt;ggaren@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         It shouldn't take 1846 lines of code and 5 FIXMEs to sort an array.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeInternalFunctionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/InternalFunction.h (183574 => 183575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/InternalFunction.h        2015-04-29 20:50:29 UTC (rev 183574)
+++ trunk/Source/JavaScriptCore/runtime/InternalFunction.h        2015-04-29 21:27:48 UTC (rev 183575)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> class InternalFunction : public JSDestructibleObject {
</span><span class="cx"> public:
</span><span class="cx">     typedef JSDestructibleObject Base;
</span><del>-    static const unsigned StructureFlags = Base::StructureFlags | ImplementsHasInstance;
</del><ins>+    static const unsigned StructureFlags = Base::StructureFlags | ImplementsHasInstance | TypeOfShouldCallGetCallData;
</ins><span class="cx"> 
</span><span class="cx">     DECLARE_EXPORT_INFO;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSTypeInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSTypeInfo.h (183574 => 183575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSTypeInfo.h        2015-04-29 20:50:29 UTC (rev 183574)
+++ trunk/Source/JavaScriptCore/runtime/JSTypeInfo.h        2015-04-29 21:27:48 UTC (rev 183575)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> static const unsigned ImplementsHasInstance = 1 &lt;&lt; 1;
</span><span class="cx"> static const unsigned OverridesHasInstance = 1 &lt;&lt; 2;
</span><span class="cx"> static const unsigned ImplementsDefaultHasInstance = 1 &lt;&lt; 3;
</span><ins>+static const unsigned TypeOfShouldCallGetCallData = 1 &lt;&lt; 4; // Need this flag if you override getCallData() and you want typeof to use this to determine if it should say &quot;function&quot;. Currently we always set this flag when we override getCallData().
</ins><span class="cx"> static const unsigned OverridesGetOwnPropertySlot = 1 &lt;&lt; 5;
</span><span class="cx"> static const unsigned InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero = 1 &lt;&lt; 6;
</span><span class="cx"> static const unsigned StructureIsImmortal = 1 &lt;&lt; 7;
</span><span class="lines">@@ -83,6 +84,7 @@
</span><span class="cx">     bool implementsHasInstance() const { return isSetOnFlags1(ImplementsHasInstance); }
</span><span class="cx">     bool overridesHasInstance() const { return isSetOnFlags1(OverridesHasInstance); }
</span><span class="cx">     bool implementsDefaultHasInstance() const { return isSetOnFlags1(ImplementsDefaultHasInstance); }
</span><ins>+    bool typeOfShouldCallGetCallData() const { return isSetOnFlags1(TypeOfShouldCallGetCallData); }
</ins><span class="cx">     bool overridesGetOwnPropertySlot() const { return overridesGetOwnPropertySlot(inlineTypeFlags()); }
</span><span class="cx">     static bool overridesGetOwnPropertySlot(InlineTypeFlags flags) { return flags &amp; OverridesGetOwnPropertySlot; }
</span><span class="cx">     bool interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero() const { return isSetOnFlags1(InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero); }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Operations.cpp (183574 => 183575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Operations.cpp        2015-04-29 20:50:29 UTC (rev 183574)
+++ trunk/Source/JavaScriptCore/runtime/Operations.cpp        2015-04-29 21:27:48 UTC (rev 183575)
</span><span class="lines">@@ -68,14 +68,19 @@
</span><span class="cx">     if (v.isSymbol())
</span><span class="cx">         return vm.smallStrings.symbolString();
</span><span class="cx">     if (v.isObject()) {
</span><ins>+        JSObject* object = asObject(v);
</ins><span class="cx">         // Return &quot;undefined&quot; for objects that should be treated
</span><span class="cx">         // as null when doing comparisons.
</span><del>-        if (asObject(v)-&gt;structure(vm)-&gt;masqueradesAsUndefined(globalObject))
</del><ins>+        if (object-&gt;structure(vm)-&gt;masqueradesAsUndefined(globalObject))
</ins><span class="cx">             return vm.smallStrings.undefinedString();
</span><del>-        CallData callData;
-        JSObject* object = asObject(v);
-        if (object-&gt;methodTable(vm)-&gt;getCallData(object, callData) != CallTypeNone)
</del><ins>+        if (object-&gt;type() == JSFunctionType)
</ins><span class="cx">             return vm.smallStrings.functionString();
</span><ins>+        if (object-&gt;inlineTypeFlags() &amp; TypeOfShouldCallGetCallData) {
+            CallData callData;
+            JSObject* object = asObject(v);
+            if (object-&gt;methodTable(vm)-&gt;getCallData(object, callData) != CallTypeNone)
+                return vm.smallStrings.functionString();
+        }
</ins><span class="cx">     }
</span><span class="cx">     return vm.smallStrings.objectString();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestsstresstypeoffunctionsandobjectsjs"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/tests/stress/type-of-functions-and-objects.js (0 => 183575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/stress/type-of-functions-and-objects.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/tests/stress/type-of-functions-and-objects.js        2015-04-29 21:27:48 UTC (rev 183575)
</span><span class="lines">@@ -0,0 +1,73 @@
</span><ins>+function foo(v) {
+    return typeof v;
+}
+
+function bar(v) {
+    switch (typeof v) {
+    case &quot;object&quot;:
+        return 1;
+    case &quot;function&quot;:
+        return 2;
+    default:
+        return 3;
+    }
+}
+
+function baz(v) {
+    return typeof v == &quot;function&quot;;
+}
+
+function fuzz(v) {
+    return typeof v == &quot;object&quot;;
+}
+
+noInline(foo);
+noInline(bar);
+noInline(baz);
+noInline(fuzz);
+
+function expect(f, v, expected) {
+    var result = f(v);
+    if (result != expected)
+        throw &quot;Error: &quot; + f.name + &quot;(&quot; + v + &quot;) returned &quot; + result + &quot; instead of &quot; + expected;
+}
+
+function test(v, expected) {
+    switch (expected) {
+    case &quot;function&quot;:
+        expect(foo, v, &quot;function&quot;);
+        expect(bar, v, 2);
+        expect(baz, v, true);
+        expect(fuzz, v, false);
+        break;
+    case &quot;object&quot;:
+        expect(foo, v, &quot;object&quot;);
+        expect(bar, v, 1);
+        expect(baz, v, false);
+        expect(fuzz, v, true);
+        break;
+    case &quot;other&quot;:
+        var result = foo(v);
+        if (result == &quot;object&quot; || result == &quot;function&quot;)
+            throw &quot;Error: foo(&quot; + v + &quot;) returned &quot; + result + &quot; but expected something other than object or function&quot;;
+        expect(bar, v, 3);
+        expect(baz, v, false);
+        expect(fuzz, v, false);
+        break;
+    default:
+        throw &quot;Bad expected case&quot;;
+    }
+}
+
+for (var i = 0; i &lt; 10000; ++i) {
+    test({}, &quot;object&quot;);
+    test(function() { }, &quot;function&quot;);
+    test(&quot;hello&quot;, &quot;other&quot;);
+    test(42, &quot;other&quot;);
+    test(null, &quot;object&quot;);
+    test(void 0, &quot;other&quot;);
+    test(42.5, &quot;other&quot;);
+    test(Map, &quot;function&quot;);
+    test(Date, &quot;function&quot;);
+    test(Map.prototype, &quot;object&quot;);
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (183574 => 183575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-04-29 20:50:29 UTC (rev 183574)
+++ trunk/Source/WebCore/ChangeLog        2015-04-29 21:27:48 UTC (rev 183575)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-04-29  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
+        https://bugs.webkit.org/show_bug.cgi?id=144397
+
+        Reviewed by Andreas Kling.
+
+        If you override getCallData() and you want to be called a &quot;function&quot;, then you need to use the
+        new TypeOfShouldCallGetCallData flag.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHeader):
+        * bridge/objc/objc_runtime.h:
+        * bridge/runtime_method.h:
+        * bridge/runtime_object.h:
+
</ins><span class="cx"> 2015-04-29  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r183553 and r183561.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (183574 => 183575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-04-29 20:50:29 UTC (rev 183574)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-04-29 21:27:48 UTC (rev 183575)
</span><span class="lines">@@ -900,6 +900,9 @@
</span><span class="cx">     if ($interface-&gt;extendedAttributes-&gt;{&quot;NewImpurePropertyFiresWatchpoints&quot;}) {
</span><span class="cx">         $structureFlags{&quot;JSC::NewImpurePropertyFiresWatchpoints&quot;} = 1;
</span><span class="cx">     }
</span><ins>+    if ($interface-&gt;extendedAttributes-&gt;{&quot;CustomCall&quot;}) {
+        $structureFlags{&quot;JSC::TypeOfShouldCallGetCallData&quot;} = 1;
+    }
</ins><span class="cx"> 
</span><span class="cx">     # Getters
</span><span class="cx">     if ($hasGetter) {
</span></span></pre></div>
<a id="trunkSourceWebCorebridgeobjcobjc_runtimeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bridge/objc/objc_runtime.h (183574 => 183575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bridge/objc/objc_runtime.h        2015-04-29 20:50:29 UTC (rev 183574)
+++ trunk/Source/WebCore/bridge/objc/objc_runtime.h        2015-04-29 21:27:48 UTC (rev 183575)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx"> class ObjcFallbackObjectImp : public JSDestructibleObject {
</span><span class="cx"> public:
</span><span class="cx">     typedef JSDestructibleObject Base;
</span><del>-    static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
</del><ins>+    static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | TypeOfShouldCallGetCallData;
</ins><span class="cx"> 
</span><span class="cx">     static ObjcFallbackObjectImp* create(ExecState* exec, JSGlobalObject* globalObject, ObjcInstance* instance, const String&amp; propertyName)
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceWebCorebridgeruntime_methodh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bridge/runtime_method.h (183574 => 183575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bridge/runtime_method.h        2015-04-29 20:50:29 UTC (rev 183574)
+++ trunk/Source/WebCore/bridge/runtime_method.h        2015-04-29 21:27:48 UTC (rev 183575)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> class WEBCORE_EXPORT RuntimeMethod : public InternalFunction {
</span><span class="cx"> public:
</span><span class="cx">     typedef InternalFunction Base;
</span><del>-    static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
</del><ins>+    static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | TypeOfShouldCallGetCallData;
</ins><span class="cx"> 
</span><span class="cx">     static RuntimeMethod* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const String&amp; name, Bindings::Method* method)
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceWebCorebridgeruntime_objecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bridge/runtime_object.h (183574 => 183575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bridge/runtime_object.h        2015-04-29 20:50:29 UTC (rev 183574)
+++ trunk/Source/WebCore/bridge/runtime_object.h        2015-04-29 21:27:48 UTC (rev 183575)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> class WEBCORE_EXPORT RuntimeObject : public JSDestructibleObject {
</span><span class="cx"> public:
</span><span class="cx">     typedef JSDestructibleObject Base;
</span><del>-    static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames;
</del><ins>+    static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames | TypeOfShouldCallGetCallData;
</ins><span class="cx"> 
</span><span class="cx">     static RuntimeObject* create(VM&amp; vm, Structure* structure, PassRefPtr&lt;Instance&gt; instance)
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (183574 => 183575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-04-29 20:50:29 UTC (rev 183574)
+++ trunk/Source/WebKit2/ChangeLog        2015-04-29 21:27:48 UTC (rev 183575)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-04-29  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
+        https://bugs.webkit.org/show_bug.cgi?id=144397
+
+        Reviewed by Andreas Kling.
+
+        If you override getCallData() and you want to be called a &quot;function&quot;, then you need to use the
+        new TypeOfShouldCallGetCallData flag.
+
+        * WebProcess/Plugins/Netscape/JSNPObject.h:
+
</ins><span class="cx"> 2015-04-29  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         ResourceLoadPriority should be enum class
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsNetscapeJSNPObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.h (183574 => 183575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.h        2015-04-29 20:50:29 UTC (rev 183574)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.h        2015-04-29 21:27:48 UTC (rev 183575)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> class JSNPObject : public JSC::JSDestructibleObject {
</span><span class="cx"> public:
</span><span class="cx">     typedef JSC::JSDestructibleObject Base;
</span><del>-    static const unsigned StructureFlags = Base::StructureFlags | JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetPropertyNames;
</del><ins>+    static const unsigned StructureFlags = Base::StructureFlags | JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetPropertyNames | JSC::TypeOfShouldCallGetCallData;
</ins><span class="cx"> 
</span><span class="cx">     static JSNPObject* create(JSC::JSGlobalObject* globalObject, NPRuntimeObjectMap* objectMap, NPObject* npObject)
</span><span class="cx">     {
</span></span></pre>
</div>
</div>

</body>
</html>