Bug 1401105 - Fix the failure of keypath-special-identifiers.htm. r=baku
authorBevis Tseng <btseng@mozilla.com>
Tue, 19 Sep 2017 15:52:48 +0800
changeset 669136 8d1f71c4d315ddd353d59705a8925f6a1bd90c75
parent 669135 513b9e8f28e64f26bf268f76c86105d439201ec8
child 669137 2b587956d915ec57422210115a74de7ab7727e94
push id81223
push usergpascutto@mozilla.com
push dateFri, 22 Sep 2017 15:21:17 +0000
reviewersbaku
bugs1401105
milestone58.0a1
Bug 1401105 - Fix the failure of keypath-special-identifiers.htm. r=baku
dom/indexedDB/KeyPath.cpp
testing/web-platform/meta/IndexedDB/keypath-special-identifiers.htm.ini
--- a/dom/indexedDB/KeyPath.cpp
+++ b/dom/indexedDB/KeyPath.cpp
@@ -99,20 +99,20 @@ GetJSValFromKeyPathString(JSContext* aCx
     NS_ASSERTION(!token.IsEmpty(), "Should be a valid keypath");
 
     const char16_t* keyPathChars = token.BeginReading();
     const size_t keyPathLen = token.Length();
 
     bool hasProp;
     if (!targetObject) {
       // We're still walking the chain of existing objects
-      // http://w3c.github.io/IndexedDB/#dfn-evaluate-a-key-path-on-a-value
+      // http://w3c.github.io/IndexedDB/#evaluate-a-key-path-on-a-value
       // step 4 substep 1: check for .length on a String value.
       if (currentVal.isString() && !tokenizer.hasMoreTokens() &&
-          token.EqualsLiteral("length") && aOptions == DoNotCreateProperties) {
+          token.EqualsLiteral("length")) {
         aKeyJSVal->setNumber(double(JS_GetStringLength(currentVal.toString())));
         break;
       }
 
       if (!currentVal.isObject()) {
         return NS_ERROR_DOM_INDEXEDDB_DATA_ERR;
       }
       obj = &currentVal.toObject();
deleted file mode 100644
--- a/testing/web-platform/meta/IndexedDB/keypath-special-identifiers.htm.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[keypath-special-identifiers.htm]
-  type: testharness
-  [Type: String, identifier: length]
-    expected: FAIL
-