Diff
Modified: trunk/Source/WebCore/ChangeLog (270114 => 270115)
--- trunk/Source/WebCore/ChangeLog 2020-11-20 14:57:43 UTC (rev 270114)
+++ trunk/Source/WebCore/ChangeLog 2020-11-20 15:45:47 UTC (rev 270115)
@@ -1,3 +1,24 @@
+2020-11-20 Don Olmstead <[email protected]>
+
+ Use final in generated callback code
+ https://bugs.webkit.org/show_bug.cgi?id=219169
+
+ Reviewed by Darin Adler.
+
+ Generated callbacks descend from ContextDestructionObserver and are final. The
+ scriptExecutionContext method is not virtual so adding override errors. Remove the virtual
+ for that case and mark the destructor as final.
+
+ Regenerated bindings through run-bindings-tests.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bindings/scripts/test/JS/JSTestCallbackFunction.h:
+ * bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.h:
+ * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h:
+ * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h:
+ * bindings/scripts/test/JS/JSTestCallbackInterface.h:
+ * bindings/scripts/test/JS/JSTestVoidCallbackFunction.h:
+
2020-11-20 Zalan Bujtas <[email protected]>
[LFC][IFC] Move horizontal space tracking from Line to LineBuilder
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (270114 => 270115)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2020-11-20 14:57:43 UTC (rev 270114)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2020-11-20 15:45:47 UTC (rev 270115)
@@ -6477,9 +6477,9 @@
push(@$contentRef, " return adoptRef(*new ${className}(callback, globalObject));\n");
push(@$contentRef, " }\n\n");
- push(@$contentRef, " virtual ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }\n\n");
+ push(@$contentRef, " ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }\n\n");
- push(@$contentRef, " virtual ~$className();\n");
+ push(@$contentRef, " ~$className() final;\n");
push(@$contentRef, " ${callbackDataType}* callbackData() { return m_data; }\n");
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h (270114 => 270115)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h 2020-11-20 14:57:43 UTC (rev 270114)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h 2020-11-20 15:45:47 UTC (rev 270115)
@@ -34,9 +34,9 @@
return adoptRef(*new JSTestCallbackFunction(callback, globalObject));
}
- virtual ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
+ ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
- virtual ~JSTestCallbackFunction();
+ ~JSTestCallbackFunction() final;
JSCallbackDataStrong* callbackData() { return m_data; }
// Functions
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.h (270114 => 270115)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.h 2020-11-20 14:57:43 UTC (rev 270114)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.h 2020-11-20 15:45:47 UTC (rev 270115)
@@ -34,9 +34,9 @@
return adoptRef(*new JSTestCallbackFunctionRethrow(callback, globalObject));
}
- virtual ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
+ ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
- virtual ~JSTestCallbackFunctionRethrow();
+ ~JSTestCallbackFunctionRethrow() final;
JSCallbackDataStrong* callbackData() { return m_data; }
// Functions
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h (270114 => 270115)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h 2020-11-20 14:57:43 UTC (rev 270114)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h 2020-11-20 15:45:47 UTC (rev 270115)
@@ -34,9 +34,9 @@
return adoptRef(*new JSTestCallbackFunctionWithThisObject(callback, globalObject));
}
- virtual ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
+ ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
- virtual ~JSTestCallbackFunctionWithThisObject();
+ ~JSTestCallbackFunctionWithThisObject() final;
JSCallbackDataStrong* callbackData() { return m_data; }
// Functions
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h (270114 => 270115)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h 2020-11-20 14:57:43 UTC (rev 270114)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h 2020-11-20 15:45:47 UTC (rev 270115)
@@ -34,9 +34,9 @@
return adoptRef(*new JSTestCallbackFunctionWithTypedefs(callback, globalObject));
}
- virtual ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
+ ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
- virtual ~JSTestCallbackFunctionWithTypedefs();
+ ~JSTestCallbackFunctionWithTypedefs() final;
JSCallbackDataStrong* callbackData() { return m_data; }
// Functions
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h (270114 => 270115)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h 2020-11-20 14:57:43 UTC (rev 270114)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h 2020-11-20 15:45:47 UTC (rev 270115)
@@ -38,9 +38,9 @@
return adoptRef(*new JSTestCallbackInterface(callback, globalObject));
}
- virtual ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
+ ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
- virtual ~JSTestCallbackInterface();
+ ~JSTestCallbackInterface() final;
JSCallbackDataStrong* callbackData() { return m_data; }
static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.h (270114 => 270115)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.h 2020-11-20 14:57:43 UTC (rev 270114)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.h 2020-11-20 15:45:47 UTC (rev 270115)
@@ -36,9 +36,9 @@
return adoptRef(*new JSTestVoidCallbackFunction(callback, globalObject));
}
- virtual ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
+ ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
- virtual ~JSTestVoidCallbackFunction();
+ ~JSTestVoidCallbackFunction() final;
JSCallbackDataStrong* callbackData() { return m_data; }
// Functions