Title: [174997] trunk/Source
- Revision
- 174997
- Author
- msab...@apple.com
- Date
- 2014-10-21 13:43:18 -0700 (Tue, 21 Oct 2014)
Log Message
Add operator==(PropertyName, const char*)
https://bugs.webkit.org/show_bug.cgi?id=137925
Reviewed by Mark Lam.
Source/_javascript_Core:
* runtime/PropertyName.h:
(JSC::operator==): Added to simplify comparison with string literals.
Source/WebCore:
Use new == operator to compare a PropertyName with a string literal.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (174996 => 174997)
--- trunk/Source/_javascript_Core/ChangeLog 2014-10-21 20:03:28 UTC (rev 174996)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-10-21 20:43:18 UTC (rev 174997)
@@ -1,5 +1,16 @@
2014-10-21 Michael Saboff <msab...@apple.com>
+ Add operator==(PropertyName, const char*)
+ https://bugs.webkit.org/show_bug.cgi?id=137925
+
+ Reviewed by Mark Lam.
+
+ * runtime/PropertyName.h:
+ (JSC::operator==): Added to simplify comparison with string literals.
+
+
+2014-10-21 Michael Saboff <msab...@apple.com>
+
Change native call frames to use the scope from their Callee instead of their caller's scope
https://bugs.webkit.org/show_bug.cgi?id=137907
Modified: trunk/Source/_javascript_Core/runtime/PropertyName.h (174996 => 174997)
--- trunk/Source/_javascript_Core/runtime/PropertyName.h 2014-10-21 20:03:28 UTC (rev 174996)
+++ trunk/Source/_javascript_Core/runtime/PropertyName.h 2014-10-21 20:43:18 UTC (rev 174997)
@@ -141,6 +141,11 @@
return a.uid() == b.uid();
}
+inline bool operator==(PropertyName a, const char* b)
+{
+ return equal(a.uid(), b);
+}
+
inline bool operator!=(PropertyName a, const Identifier& b)
{
return a.uid() != b.impl();
Modified: trunk/Source/WebCore/ChangeLog (174996 => 174997)
--- trunk/Source/WebCore/ChangeLog 2014-10-21 20:03:28 UTC (rev 174996)
+++ trunk/Source/WebCore/ChangeLog 2014-10-21 20:43:18 UTC (rev 174997)
@@ -1,3 +1,15 @@
+2014-10-21 Michael Saboff <msab...@apple.com>
+
+ Add operator==(PropertyName, const char*)
+ https://bugs.webkit.org/show_bug.cgi?id=137925
+
+ Reviewed by Mark Lam.
+
+ Use new == operator to compare a PropertyName with a string literal.
+
+ * bindings/js/JSHTMLDocumentCustom.cpp:
+ (WebCore::JSHTMLDocument::getOwnPropertySlot):
+
2014-10-21 Chris Dumez <cdu...@apple.com>
Unreviewed iOS build fix after r174921.
Modified: trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp (174996 => 174997)
--- trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp 2014-10-21 20:03:28 UTC (rev 174996)
+++ trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp 2014-10-21 20:43:18 UTC (rev 174997)
@@ -62,15 +62,15 @@
JSHTMLDocument* thisObject = jsCast<JSHTMLDocument*>(object);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
- if (equal(propertyName.publicName(), "open")) {
+ if (propertyName == "open") {
slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, nonCachingStaticFunctionGetter<jsHTMLDocumentPrototypeFunctionOpen, 2>);
return true;
}
- if (equal(propertyName.publicName(), "write")) {
+ if (propertyName == "write") {
slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, nonCachingStaticFunctionGetter<jsHTMLDocumentPrototypeFunctionWrite, 1>);
return true;
}
- if (equal(propertyName.publicName(), "writeln")) {
+ if (propertyName == "writeln") {
slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, nonCachingStaticFunctionGetter<jsHTMLDocumentPrototypeFunctionWriteln, 1>);
return true;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes