<!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>[200287] trunk/Source/WebCore</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/200287">200287</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-04-29 21:51:31 -0700 (Fri, 29 Apr 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Get rid of unnecessary null check in wrap(JSDOMGlobalObject*, DOMClass*)
https://bugs.webkit.org/show_bug.cgi?id=157224
Reviewed by Ryosuke Niwa.
Get rid of unnecessary null check in wrap(JSDOMGlobalObject*, DOMClass*)
since all the call sites already do a null check. Also update the function
to take the implementation object by reference instead of pointer. Finally,
use is<>() / downcast<>() more at the call sites.
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::update):
(WebCore::IDBCursor::deleteFunction):
(WebCore::IDBCursor::setGetResult):
* Modules/indexeddb/IDBCursor.h:
(WebCore::IDBCursor::isKeyCursorWithValue):
(WebCore::IDBCursor::isKeyCursor): Deleted.
* Modules/indexeddb/IDBCursorWithValue.h:
(isType):
* bindings/js/JSBlobCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/js/JSDOMBinding.h:
(WebCore::wrap):
* bindings/js/JSIDBCursorCustom.cpp:
(WebCore::toJS):
* bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
(WebCore::toJS):
* bindings/js/JSPerformanceEntryCustom.cpp:
(WebCore::toJS):
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGLRenderingContext.h:
* page/PerformanceMark.h:
(isType):
(WebCore::PerformanceMark::isMark): Deleted.
* page/PerformanceMeasure.h:
(isType):
(WebCore::PerformanceMeasure::isMeasure): Deleted.
* page/PerformanceResourceTiming.h:
(isType):
(WebCore::PerformanceResourceTiming::isResource): Deleted.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorcpp">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorh">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorWithValueh">trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSBlobCustomcpp">trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCanvasRenderingContextCustomcpp">trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingh">trunk/Source/WebCore/bindings/js/JSDOMBinding.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBCursorCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMediaStreamCapabilitiesCustomcpp">trunk/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSPerformanceEntryCustomcpp">trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGL2RenderingContexth">trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLRenderingContexth">trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceEntryh">trunk/Source/WebCore/page/PerformanceEntry.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceMarkh">trunk/Source/WebCore/page/PerformanceMark.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceMeasureh">trunk/Source/WebCore/page/PerformanceMeasure.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceResourceTimingh">trunk/Source/WebCore/page/PerformanceResourceTiming.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/ChangeLog        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -1,5 +1,50 @@
</span><span class="cx"> 2016-04-29 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><ins>+ Get rid of unnecessary null check in wrap(JSDOMGlobalObject*, DOMClass*)
+ https://bugs.webkit.org/show_bug.cgi?id=157224
+
+ Reviewed by Ryosuke Niwa.
+
+ Get rid of unnecessary null check in wrap(JSDOMGlobalObject*, DOMClass*)
+ since all the call sites already do a null check. Also update the function
+ to take the implementation object by reference instead of pointer. Finally,
+ use is<>() / downcast<>() more at the call sites.
+
+ * Modules/indexeddb/IDBCursor.cpp:
+ (WebCore::IDBCursor::update):
+ (WebCore::IDBCursor::deleteFunction):
+ (WebCore::IDBCursor::setGetResult):
+ * Modules/indexeddb/IDBCursor.h:
+ (WebCore::IDBCursor::isKeyCursorWithValue):
+ (WebCore::IDBCursor::isKeyCursor): Deleted.
+ * Modules/indexeddb/IDBCursorWithValue.h:
+ (isType):
+ * bindings/js/JSBlobCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSCanvasRenderingContextCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSDOMBinding.h:
+ (WebCore::wrap):
+ * bindings/js/JSIDBCursorCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
+ (WebCore::toJS):
+ * bindings/js/JSPerformanceEntryCustom.cpp:
+ (WebCore::toJS):
+ * html/canvas/WebGL2RenderingContext.h:
+ * html/canvas/WebGLRenderingContext.h:
+ * page/PerformanceMark.h:
+ (isType):
+ (WebCore::PerformanceMark::isMark): Deleted.
+ * page/PerformanceMeasure.h:
+ (isType):
+ (WebCore::PerformanceMeasure::isMeasure): Deleted.
+ * page/PerformanceResourceTiming.h:
+ (isType):
+ (WebCore::PerformanceResourceTiming::isResource): Deleted.
+
+2016-04-29 Chris Dumez <cdumez@apple.com>
+
</ins><span class="cx"> Use LIKELY() / UNLIKELY() hints when suitable in the JavaScript bindings
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=157210
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -187,7 +187,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (isKeyCursor()) {
</del><ins>+ if (!isKeyCursorWithValue()) {
</ins><span class="cx"> ec.code = IDBDatabaseException::InvalidStateError;
</span><span class="cx"> ec.message = ASCIILiteral("Failed to execute 'update' on 'IDBCursor': The cursor is a key cursor.");
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -350,7 +350,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (isKeyCursor()) {
</del><ins>+ if (!isKeyCursorWithValue()) {
</ins><span class="cx"> ec.code = IDBDatabaseException::InvalidStateError;
</span><span class="cx"> ec.message = ASCIILiteral("Failed to execute 'delete' on 'IDBCursor': The cursor is a key cursor.");
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -393,10 +393,10 @@
</span><span class="cx"> m_currentPrimaryKey = { vm, idbKeyDataToScriptValue(*context, getResult.primaryKeyData()) };
</span><span class="cx"> m_currentPrimaryKeyData = getResult.primaryKeyData();
</span><span class="cx">
</span><del>- if (isKeyCursor())
</del><ins>+ if (isKeyCursorWithValue())
+ m_currentValue = { vm, deserializeIDBValueToJSValue(*context, getResult.value()) };
+ else
</ins><span class="cx"> m_currentValue = { };
</span><del>- else
- m_currentValue = { vm, deserializeIDBValueToJSValue(*context, getResult.value()) };
</del><span class="cx">
</span><span class="cx"> m_gotValue = true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">
</span><span class="cx"> void setGetResult(IDBRequest&, const IDBGetResult&);
</span><span class="cx">
</span><del>- virtual bool isKeyCursor() const { return true; }
</del><ins>+ virtual bool isKeyCursorWithValue() const { return false; }
</ins><span class="cx">
</span><span class="cx"> void decrementOutstandingRequestCount();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorWithValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><span class="cx"> #include "IDBCursor.h"
</span><ins>+#include <wtf/TypeCasts.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -38,7 +39,7 @@
</span><span class="cx">
</span><span class="cx"> virtual ~IDBCursorWithValue();
</span><span class="cx">
</span><del>- bool isKeyCursor() const final { return false; }
</del><ins>+ bool isKeyCursorWithValue() const override { return true; }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> IDBCursorWithValue(IDBTransaction&, IDBObjectStore&, const IDBCursorInfo&);
</span><span class="lines">@@ -47,4 +48,8 @@
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::IDBCursorWithValue)
+ static bool isType(const WebCore::IDBCursor& cursor) { return cursor.isKeyCursorWithValue(); }
+SPECIALIZE_TYPE_TRAITS_END()
+
</ins><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSBlobCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -53,10 +53,10 @@
</span><span class="cx"> if (!blob)
</span><span class="cx"> return jsNull();
</span><span class="cx">
</span><del>- if (blob->isFile())
- return wrap<JSFile>(globalObject, static_cast<File*>(blob));
</del><ins>+ if (is<File>(*blob))
+ return wrap<JSFile>(globalObject, downcast<File>(*blob));
</ins><span class="cx">
</span><del>- return wrap<JSBlob>(globalObject, blob);
</del><ins>+ return wrap<JSBlob>(globalObject, *blob);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL constructJSBlob(ExecState* exec)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCanvasRenderingContextCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -53,15 +53,14 @@
</span><span class="cx"> return jsNull();
</span><span class="cx">
</span><span class="cx"> #if ENABLE(WEBGL)
</span><del>- if (object->isWebGL1())
- return wrap<JSWebGLRenderingContext>(globalObject, static_cast<WebGLRenderingContext*>(object));
</del><ins>+ if (is<WebGLRenderingContext>(*object))
+ return wrap<JSWebGLRenderingContext>(globalObject, downcast<WebGLRenderingContext>(*object));
</ins><span class="cx"> #if ENABLE(WEBGL2)
</span><del>- if (object->isWebGL2())
- return wrap<JSWebGL2RenderingContext>(globalObject, static_cast<WebGL2RenderingContext*>(object));
</del><ins>+ if (is<WebGL2RenderingContext>(*object))
+ return wrap<JSWebGL2RenderingContext>(globalObject, downcast<WebGL2RenderingContext>(*object));
</ins><span class="cx"> #endif
</span><span class="cx"> #endif
</span><del>- ASSERT_WITH_SECURITY_IMPLICATION(object->is2d());
- return wrap<JSCanvasRenderingContext2D>(globalObject, static_cast<CanvasRenderingContext2D*>(object));
</del><ins>+ return wrap<JSCanvasRenderingContext2D>(globalObject, downcast<CanvasRenderingContext2D>(*object));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -267,13 +267,11 @@
</span><span class="cx"> return wrapper;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template<typename WrapperClass, typename DOMClass> inline JSC::JSValue wrap(JSDOMGlobalObject* globalObject, DOMClass* domObject)
</del><ins>+template<typename WrapperClass, typename DOMClass> inline JSC::JSValue wrap(JSDOMGlobalObject* globalObject, DOMClass& domObject)
</ins><span class="cx"> {
</span><del>- if (!domObject)
- return JSC::jsNull();
- if (JSC::JSObject* wrapper = getCachedWrapper(globalObject->world(), domObject))
</del><ins>+ if (JSC::JSObject* wrapper = getCachedWrapper(globalObject->world(), &domObject))
</ins><span class="cx"> return wrapper;
</span><del>- return createWrapper<WrapperClass>(globalObject, domObject);
</del><ins>+ return createWrapper<WrapperClass>(globalObject, &domObject);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<typename WrapperClass, typename DOMClass> inline JSC::JSValue getExistingWrapper(JSDOMGlobalObject* globalObject, DOMClass* domObject)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBCursorCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -54,9 +54,13 @@
</span><span class="cx">
</span><span class="cx"> JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, IDBCursor* cursor)
</span><span class="cx"> {
</span><del>- if (cursor->isKeyCursor())
- return wrap<JSIDBCursor>(globalObject, cursor);
- return wrap<JSIDBCursorWithValue>(globalObject, static_cast<IDBCursorWithValue*>(cursor));
</del><ins>+ if (!cursor)
+ return JSC::jsNull();
+
+ if (is<IDBCursorWithValue>(*cursor))
+ return wrap<JSIDBCursorWithValue>(globalObject, downcast<IDBCursorWithValue>(*cursor));
+
+ return wrap<JSIDBCursor>(globalObject, *cursor);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMediaStreamCapabilitiesCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -43,9 +43,9 @@
</span><span class="cx"> return jsNull();
</span><span class="cx">
</span><span class="cx"> if (object->hasVideoSource())
</span><del>- return wrap<JSAllVideoCapabilities>(globalObject, static_cast<AllVideoCapabilities*>(object));
</del><ins>+ return wrap<JSAllVideoCapabilities>(globalObject, static_cast<AllVideoCapabilities>(*object));
</ins><span class="cx">
</span><del>- return wrap<JSAllAudioCapabilities>(globalObject, static_cast<AllAudioCapabilities*>(object));
</del><ins>+ return wrap<JSAllAudioCapabilities>(globalObject, static_cast<AllAudioCapabilities>(*object));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSPerformanceEntryCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -52,19 +52,19 @@
</span><span class="cx"> return jsNull();
</span><span class="cx">
</span><span class="cx"> #if ENABLE(RESOURCE_TIMING)
</span><del>- if (entry->isResource())
- return wrap<JSPerformanceResourceTiming>(globalObject, static_cast<PerformanceResourceTiming*>(entry));
</del><ins>+ if (is<PerformanceResourceTiming>(*entry))
+ return wrap<JSPerformanceResourceTiming>(globalObject, downcast<PerformanceResourceTiming>(*entry));
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(USER_TIMING)
</span><del>- if (entry->isMark())
- return wrap<JSPerformanceMark>(globalObject, static_cast<PerformanceMark*>(entry));
</del><ins>+ if (is<PerformanceMark>(*entry))
+ return wrap<JSPerformanceMark>(globalObject, downcast<PerformanceMark>(*entry));
</ins><span class="cx">
</span><del>- if (entry->isMeasure())
- return wrap<JSPerformanceMeasure>(globalObject, static_cast<PerformanceMeasure*>(entry));
</del><ins>+ if (is<PerformanceMeasure>(*entry))
+ return wrap<JSPerformanceMeasure>(globalObject, downcast<PerformanceMeasure>(*entry));
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- return wrap<JSPerformanceEntry>(globalObject, entry);
</del><ins>+ return wrap<JSPerformanceEntry>(globalObject, *entry);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGL2RenderingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -220,6 +220,8 @@
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CANVASRENDERINGCONTEXT(WebCore::WebGL2RenderingContext, isWebGL2())
+
</ins><span class="cx"> #endif // WEBGL2
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLRenderingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -85,4 +85,6 @@
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CANVASRENDERINGCONTEXT(WebCore::WebGLRenderingContext, isWebGL1())
+
</ins><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceEntryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceEntry.h (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceEntry.h        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/page/PerformanceEntry.h        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include "Performance.h"
</span><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><ins>+#include <wtf/TypeCasts.h>
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -50,9 +51,9 @@
</span><span class="cx"> double startTime() const;
</span><span class="cx"> double duration() const;
</span><span class="cx">
</span><del>- virtual bool isResource() { return false; }
- virtual bool isMark() { return false; }
- virtual bool isMeasure() { return false; }
</del><ins>+ virtual bool isResource() const { return false; }
+ virtual bool isMark() const { return false; }
+ virtual bool isMeasure() const { return false; }
</ins><span class="cx">
</span><span class="cx"> static bool startTimeCompareLessThan(PassRefPtr<PerformanceEntry> a, PassRefPtr<PerformanceEntry> b)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceMarkh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceMark.h (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceMark.h        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/page/PerformanceMark.h        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -34,11 +34,11 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class PerformanceMark : public PerformanceEntry {
</del><ins>+class PerformanceMark final : public PerformanceEntry {
</ins><span class="cx"> public:
</span><span class="cx"> static Ref<PerformanceMark> create(const String& name, double startTime) { return adoptRef(*new PerformanceMark(name, startTime)); }
</span><span class="cx">
</span><del>- virtual bool isMark() { return true; }
</del><ins>+ bool isMark() const override { return true; }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> PerformanceMark(const String& name, double startTime) : PerformanceEntry(name, "mark", startTime, startTime) { }
</span><span class="lines">@@ -47,6 +47,10 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::PerformanceMark)
+ static bool isType(const WebCore::PerformanceEntry& entry) { return entry.isMark(); }
+SPECIALIZE_TYPE_TRAITS_END()
+
</ins><span class="cx"> #endif // ENABLE(USER_TIMING)
</span><span class="cx">
</span><span class="cx"> #endif // !defined(PerformanceMark_h)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceMeasureh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceMeasure.h (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceMeasure.h        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/page/PerformanceMeasure.h        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -34,11 +34,11 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class PerformanceMeasure : public PerformanceEntry {
</del><ins>+class PerformanceMeasure final : public PerformanceEntry {
</ins><span class="cx"> public:
</span><span class="cx"> static Ref<PerformanceMeasure> create(const String& name, double startTime, double duration) { return adoptRef(*new PerformanceMeasure(name, startTime, duration)); }
</span><span class="cx">
</span><del>- virtual bool isMeasure() { return true; }
</del><ins>+ bool isMeasure() const override { return true; }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> PerformanceMeasure(const String& name, double startTime, double duration) : PerformanceEntry(name, "measure", startTime, duration) { }
</span><span class="lines">@@ -47,6 +47,10 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::PerformanceMeasure)
+ static bool isType(const WebCore::PerformanceEntry& entry) { return entry.isMeasure(); }
+SPECIALIZE_TYPE_TRAITS_END()
+
</ins><span class="cx"> #endif // ENABLE(USER_TIMING)
</span><span class="cx">
</span><span class="cx"> #endif // !defined(PerformanceMeasure_h)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceResourceTimingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceResourceTiming.h (200286 => 200287)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceResourceTiming.h        2016-04-30 04:48:34 UTC (rev 200286)
+++ trunk/Source/WebCore/page/PerformanceResourceTiming.h        2016-04-30 04:51:31 UTC (rev 200287)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> class ResourceRequest;
</span><span class="cx"> class ResourceResponse;
</span><span class="cx">
</span><del>-class PerformanceResourceTiming : public PerformanceEntry {
</del><ins>+class PerformanceResourceTiming final : public PerformanceEntry {
</ins><span class="cx"> public:
</span><span class="cx"> static Ref<PerformanceResourceTiming> create(const AtomicString& initiatorType, const ResourceRequest& request, const ResourceResponse& response, double initiationTime, double finishTime, Document* requestingDocument)
</span><span class="cx"> {
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> double requestStart() const;
</span><span class="cx"> double responseEnd() const;
</span><span class="cx">
</span><del>- virtual bool isResource() { return true; }
</del><ins>+ bool isResource() const override { return true; }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> PerformanceResourceTiming(const AtomicString& initatorType, const ResourceRequest&, const ResourceResponse&, double initiationTime, double finishTime, Document*);
</span><span class="lines">@@ -85,6 +85,11 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::PerformanceResourceTiming)
+ static bool isType(const WebCore::PerformanceEntry& entry) { return entry.isResource(); }
+SPECIALIZE_TYPE_TRAITS_END()
+
</ins><span class="cx"> #endif // ENABLE(RESOURCE_TIMING)
</span><span class="cx">
</span><span class="cx"> #endif // !defined(PerformanceResourceTiming_h)
</span></span></pre>
</div>
</div>
</body>
</html>