Closed
Bug 1492737
Opened 7 years ago
Closed 7 years ago
Fix the failure of keypath-exceptions.htm in web platform tests
Categories
(Core :: Storage: IndexedDB, defect, P2)
Core
Storage: IndexedDB
Tracking
()
RESOLVED
FIXED
mozilla64
People
(Reporter: janv, Assigned: janv)
References
Details
Attachments
(4 files, 1 obsolete file)
|
5.16 KB,
patch
|
asuth
:
review+
pascalc
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
|
7.73 KB,
patch
|
janv
:
review+
|
Details | Diff | Splinter Review |
|
7.88 KB,
patch
|
RyanVM
:
approval-mozilla-esr60+
|
Details | Diff | Splinter Review |
|
5.56 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Updated•7 years ago
|
Assignee: nobody → jvarga
Status: NEW → ASSIGNED
Priority: -- → P2
| Assignee | ||
Comment 1•7 years ago
|
||
| Assignee | ||
Comment 2•7 years ago
|
||
Attachment #9010623 -
Flags: review?(jwalden+bmo)
| Assignee | ||
Comment 3•7 years ago
|
||
Attachment #9010624 -
Flags: review?(bugmail)
Comment 4•7 years ago
|
||
Comment on attachment 9010623 [details] [diff] [review]
Part 1: Support passing name length to JS_GetOwnUCPropertyDescriptor and add JS_GetUCPropertyDescriptor
Review of attachment 9010623 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/xbl/nsXBLProtoImpl.cpp
@@ +97,5 @@
> // holder called |foo| in the XBL scope. Check for that to avoid wasteful and
> // weird property holder duplication.
> + const nsString& className = aPrototypeBinding->ClassName();
> + const char16_t* classNameChars = className.get();
> + const size_t classNameLen = className.Length();
Put a blank line after this, give the code some breathing room.
::: js/src/jsapi.cpp
@@ +2083,3 @@
> MutableHandle<PropertyDescriptor> desc)
> {
> + JSAtom* atom = AtomizeChars(cx, name, AUTO_NAMELEN(name, namelen));
Don't do the AUTO_NAMELEN junk. If users want to do that, they should do it themselves -- double-meaning parameters tend to gunk things up over time. Just use namelen directly. (And I guess because code lower down does want AUTO_NAMELEN -- and it is not necessary or critical to fix that now -- just leave it where it was.)
@@ +2113,5 @@
> +JS_PUBLIC_API(bool)
> +JS_GetUCPropertyDescriptor(JSContext* cx, HandleObject obj, const char16_t* name, size_t namelen,
> + MutableHandle<PropertyDescriptor> desc)
> +{
> + JSAtom* atom = AtomizeChars(cx, name, AUTO_NAMELEN(name, namelen));
Again, use namelen directly.
Attachment #9010623 -
Flags: review?(jwalden+bmo) → review+
| Assignee | ||
Comment 5•7 years ago
|
||
Attachment #9010623 -
Attachment is obsolete: true
Attachment #9011704 -
Flags: review+
Comment 6•7 years ago
|
||
Comment on attachment 9010624 [details] [diff] [review]
Part 2: Avoid searching the prototype chain when extracting keys
Review of attachment 9010624 [details] [diff] [review]:
-----------------------------------------------------------------
And I see from the keypath.htm that we definitely do have coverage for the Array.length and String.length special-cases also covered by the spec on key-path evaluation. I infer the difference for Blob/File is that the WebIDL bindings are explicitly implemented as getters, so our logic, of necessity, must manually special-case these getters (consistent with the spec).
::: dom/indexedDB/KeyPath.cpp
@@ +166,5 @@
> + JS_NewUCStringCopyN(aCx, name.get(), name.Length());
> +
> + intermediate = JS::StringValue(string);
> + hasProp = true;
> + } else if (token.EqualsLiteral("lastModified")) {
It might be worth calling out in a comment that although the spec also lists "lastModifiedDate" that we deprecated and removed support for it.
Attachment #9010624 -
Flags: review?(bugmail) → review+
Pushed by jvarga@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/96c9ba18c857
Part 1: Support passing name length to JS_GetOwnUCPropertyDescriptor and add JS_GetUCPropertyDescriptor; r=Waldo
https://hg.mozilla.org/integration/mozilla-inbound/rev/40225b349c7c
Part 2: Avoid searching the prototype chain when extracting keys; r=asuth
| Assignee | ||
Comment 8•7 years ago
|
||
(In reply to Andrew Sutherland [:asuth] from comment #6)
> ::: dom/indexedDB/KeyPath.cpp
> @@ +166,5 @@
> > + JS_NewUCStringCopyN(aCx, name.get(), name.Length());
> > +
> > + intermediate = JS::StringValue(string);
> > + hasProp = true;
> > + } else if (token.EqualsLiteral("lastModified")) {
>
> It might be worth calling out in a comment that although the spec also lists
> "lastModifiedDate" that we deprecated and removed support for it.
Ok, added a comment.
Comment 9•7 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/96c9ba18c857
https://hg.mozilla.org/mozilla-central/rev/40225b349c7c
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
| Assignee | ||
Comment 11•7 years ago
|
||
Comment on attachment 9010624 [details] [diff] [review]
Part 2: Avoid searching the prototype chain when extracting keys
[Beta/Release Uplift Approval Request]
Feature/Bug causing the regression: Longstanding IndexedDB correctness issue.
User impact if declined: Web developers may be more inclined to fall back to LocalStorage which is all around a worse API for developers and users, or give Firefox a degraded experience.
Is this code covered by automated tests?: Yes
Has the fix been verified in Nightly?: Yes
Needs manual test from QE?: No
If yes, steps to reproduce:
List of other uplifts needed: None
Risk to taking this patch: Low
Why is the change risky/not risky? (and alternatives if risky): We have thorough automated tests.
String changes made/needed: No string changes.
Flags: needinfo?(jvarga)
Attachment #9010624 -
Flags: approval-mozilla-beta?
Comment 12•7 years ago
|
||
Comment on attachment 9010624 [details] [diff] [review]
Part 2: Avoid searching the prototype chain when extracting keys
Low risk patch that has been on nightly for 2 weeks, approved for the last 63 beta, thanks.
Attachment #9010624 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 13•7 years ago
|
||
FYI, the patch grafts cleanly to ESR60 as well, but hits test failures:
https://treeherder.mozilla.org/logviewer.html#?job_id=204790357&repo=try&lineNumber=2179
https://treeherder.mozilla.org/logviewer.html#?job_id=204791396&repo=try&lineNumber=7101
status-firefox63:
--- → affected
status-firefox-esr60:
--- → affected
Comment 14•7 years ago
|
||
| bugherder uplift | ||
https://hg.mozilla.org/releases/mozilla-beta/rev/d43c7f7c0d15
https://hg.mozilla.org/releases/mozilla-beta/rev/1c577d6a48f0
Flags: in-testsuite+
| Assignee | ||
Comment 15•7 years ago
|
||
| Assignee | ||
Comment 16•7 years ago
|
||
| Assignee | ||
Comment 17•7 years ago
|
||
Comment on attachment 9017265 [details] [diff] [review]
Part 1 for ESR60
[ESR Uplift Approval Request]
If this is not a sec:{high,crit} bug, please state case for ESR consideration: Longstanding IndexedDB correctness issue and also see bug 1487660.
User impact if declined: Web developers may be more inclined to fall back to LocalStorage which is all around a worse API for developers and users, or give Firefox a degraded experience.
Fix Landed on Version: 64 and 63
Risk to taking this patch: Low
Why is the change risky/not risky? (and alternatives if risky): We have thorough automated tests.
String or UUID changes made by this patch: No string changes.
Attachment #9017265 -
Flags: approval-mozilla-esr60?
Comment 18•7 years ago
|
||
Comment on attachment 9017265 [details] [diff] [review]
Part 1 for ESR60
Thanks for doing the rebase. I've confirmed that the wpt failures I saw on my Try push are gone now. Approved for 60.3esr.
Attachment #9017265 -
Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
Comment 19•7 years ago
|
||
| bugherder uplift | ||
You need to log in
before you can comment on or make changes to this bug.
Description
•