Title: [178855] trunk/Source/_javascript_Core
- Revision
- 178855
- Author
- msab...@apple.com
- Date
- 2015-01-21 11:46:13 -0800 (Wed, 21 Jan 2015)
Log Message
Eliminate construct methods from NullGetterFunction and NullSetterFunction classes
https://bugs.webkit.org/show_bug.cgi?id=140708
Reviewed by Mark Lam.
Eliminated construct methods and change getConstructData() for both classes to return
ConstructTypeNone as they can never be called.
* runtime/NullGetterFunction.cpp:
(JSC::NullGetterFunction::getConstructData):
(JSC::constructReturnUndefined): Deleted.
* runtime/NullSetterFunction.cpp:
(JSC::NullSetterFunction::getConstructData):
(JSC::constructReturnUndefined): Deleted.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (178854 => 178855)
--- trunk/Source/_javascript_Core/ChangeLog 2015-01-21 19:35:08 UTC (rev 178854)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-01-21 19:46:13 UTC (rev 178855)
@@ -1,3 +1,20 @@
+2015-01-21 Michael Saboff <msab...@apple.com>
+
+ Eliminate construct methods from NullGetterFunction and NullSetterFunction classes
+ https://bugs.webkit.org/show_bug.cgi?id=140708
+
+ Reviewed by Mark Lam.
+
+ Eliminated construct methods and change getConstructData() for both classes to return
+ ConstructTypeNone as they can never be called.
+
+ * runtime/NullGetterFunction.cpp:
+ (JSC::NullGetterFunction::getConstructData):
+ (JSC::constructReturnUndefined): Deleted.
+ * runtime/NullSetterFunction.cpp:
+ (JSC::NullSetterFunction::getConstructData):
+ (JSC::constructReturnUndefined): Deleted.
+
2015-01-21 Csaba Osztrogonác <o...@webkit.org>
Remove ENABLE(INSPECTOR) ifdef guards
Modified: trunk/Source/_javascript_Core/runtime/NullGetterFunction.cpp (178854 => 178855)
--- trunk/Source/_javascript_Core/runtime/NullGetterFunction.cpp 2015-01-21 19:35:08 UTC (rev 178854)
+++ trunk/Source/_javascript_Core/runtime/NullGetterFunction.cpp 2015-01-21 19:46:13 UTC (rev 178855)
@@ -38,21 +38,15 @@
return JSValue::encode(jsUndefined());
}
-static EncodedJSValue JSC_HOST_CALL constructReturnUndefined(ExecState*)
-{
- return JSValue::encode(jsUndefined());
-}
-
CallType NullGetterFunction::getCallData(JSCell*, CallData& callData)
{
callData.native.function = callReturnUndefined;
return CallTypeHost;
}
-ConstructType NullGetterFunction::getConstructData(JSCell*, ConstructData& constructData)
+ConstructType NullGetterFunction::getConstructData(JSCell*, ConstructData&)
{
- constructData.native.function = constructReturnUndefined;
- return ConstructTypeHost;
+ return ConstructTypeNone;
}
}
Modified: trunk/Source/_javascript_Core/runtime/NullSetterFunction.cpp (178854 => 178855)
--- trunk/Source/_javascript_Core/runtime/NullSetterFunction.cpp 2015-01-21 19:35:08 UTC (rev 178854)
+++ trunk/Source/_javascript_Core/runtime/NullSetterFunction.cpp 2015-01-21 19:46:13 UTC (rev 178855)
@@ -76,23 +76,15 @@
return JSValue::encode(jsUndefined());
}
-static EncodedJSValue JSC_HOST_CALL constructReturnUndefined(ExecState* exec)
-{
- if (callerIsStrict(exec))
- return JSValue::encode(throwTypeError(exec, ASCIILiteral("Setting a property that has only a getter")));
- return JSValue::encode(jsUndefined());
-}
-
CallType NullSetterFunction::getCallData(JSCell*, CallData& callData)
{
callData.native.function = callReturnUndefined;
return CallTypeHost;
}
-ConstructType NullSetterFunction::getConstructData(JSCell*, ConstructData& constructData)
+ConstructType NullSetterFunction::getConstructData(JSCell*, ConstructData&)
{
- constructData.native.function = constructReturnUndefined;
- return ConstructTypeHost;
+ return ConstructTypeNone;
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes