Fix failure of idbfactory_open9.htm in web-platform test.

NEW
Unassigned

Status

()

P3
normal
2 years ago
7 months ago

People

(Reporter: bevis, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: btpp-active)

Comment hidden (empty)
(Reporter)

Updated

2 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
See Also: → bug 785884
Whiteboard: btpp-active
(Reporter)

Comment 1

2 years ago
set wrong status unexpectedly.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
(Reporter)

Updated

2 years ago
Status: REOPENED → ASSIGNED
(Reporter)

Comment 2

2 years ago
After further investigation, this failure is related to the change in bug 785884, because I can get positive result if I roll back the interface change of the open methods in IDBFactory.webidl.

The reason is that:
1. In idbfactory_open9.htm, there are several tests to verify the behaviour of the IDBFactory.open(name, *optional* version), and we failed at the following given versions:
false, 
{
  toString: function() { 
    assert_unreached("toString should not be called for ToPrimitive [Number]"); },
  }
  valueOf: function() { return 0; }
},
{
  toString: function() { return 0; },
  valueOf: function() { return {}; }
},
{
  toString: function() { return {}; },
  valueOf: function() { return {}; },
},

2. However, in bug 785884, we defined a new overloaded *open* method(Gecko-specific) as IDBFactory.open(name, IDBOpenDBOptions) and removed the *optional* attribute of the version in orignal open() to prevent the ambiguity of the these 2 methods.

Hence, all open invocation with the non-numeric versions in the test case will be directed to the open method with IDBOpenOptions as input.

Maybe we have to redefine this open method without overloading to the one defined in the IDB spec.

NI Jan to see if there is any better suggestion to fix this problem.
Depends on: 785884
Flags: needinfo?(jvarga)
(Reporter)

Comment 3

2 years ago
(In reply to Bevis Tseng[:bevistseng][:btseng] from comment #2)
> 1. In idbfactory_open9.htm, there are several tests to verify the behaviour
> of the IDBFactory.open(name, *optional* version), and we failed at the
> following given versions:
TypeError is expected to be thrown but was not.
> false, 
it's *null* instead of false.
(Reporter)

Updated

2 years ago
Blocks: 785884
No longer depends on: 785884
(Reporter)

Updated

2 years ago
Duplicate of this bug: 1253634
Depends on: 1276576

Comment 5

2 years ago
I think we have to live with this for now. The only way how to get persistent storage for IndexedDB is to pass { storage: "persistent" } as the second argument to open().

We will be able to remove the special argument once we have fully working implementation of navigator.storage.persist()
Flags: needinfo?(jvarga)
(Reporter)

Comment 6

2 years ago
(In reply to Jan Varga [:janv] from comment #5)
> I think we have to live with this for now. The only way how to get
> persistent storage for IndexedDB is to pass { storage: "persistent" } as the
> second argument to open().
> 
> We will be able to remove the special argument once we have fully working
> implementation of navigator.storage.persist()

Thanks for clarifying this.
Add dependency on bug 1286717 per comment 5.
Depends on: 1286717
(Reporter)

Updated

7 months ago
Assignee: btseng → nobody
Status: ASSIGNED → NEW

Updated

7 months ago
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.