Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for 'steps for storing' #146

Merged
merged 1 commit into from
Mar 9, 2017
Merged

Fixes for 'steps for storing' #146

merged 1 commit into from
Mar 9, 2017

Conversation

inexorabletash
Copy link
Member

@brettz9 - could you do an initial review?

This covers the issues from #144 (apart from the > MAX_SAFE_INTEGER/keygen ones)

@brettz9
Copy link
Contributor

brettz9 commented Feb 14, 2017

It all looks go to me, with the exception that I'm unclear on the following...

It seems to me that 3. If |hop| is false, return true. should instead be:

>3. If |hop| is false, run these substeps
>    1. Let o be a new Object created as if by the expression ({}).
>    2. Let status be CreateDataProperty(value, identifier, o).
>    3. Assert: status is true.

...because the whole algorithm ought to continue on to keep checking the remaining identifiers. However, I guess you will need to add a step to make a clone of this clone to avoid the checking having the inadvertent side effect of adding objects before the actual injection steps.

@inexorabletash
Copy link
Member Author

inexorabletash commented Feb 14, 2017

...because the whole algorithm ought to continue on to keep checking the remaining identifiers.

If hop is false it has no property; the corresponding injection steps will add a blank object as necessary for the remaining (non-last) identifiers. That blank object will have no own-properties so therefore it will (inductively) be okay to add more; there's no need to actually do the creation here.

@brettz9
Copy link
Contributor

brettz9 commented Feb 14, 2017

I see, then LGTM.

Btw, one bit of personal info I might share in case it may be useful in future collaborations... I suffer from CFS with attendant brain fog, so although I have the underlying ability to think these kinds of things through, I can get a kind of tunnel vision (beyond that we all experience). I try to compensate by testing and revisiting as well as generally trying hard to think something through before posting, but it may sometimes come out seeming like I'm just being careless or lazy. I just mention it in case it may minimize any frustration in communications (and hopefully any other contributions I can make will compensate).

@inexorabletash
Copy link
Member Author

@brettz9 - having a diversity of skills, interests, abilities, backgrounds, and communication and working styles is incredibly valuable to producing the best possible specs. You've noticed several issues that others missed. Your contributions are very much appreciated!

@inexorabletash
Copy link
Member Author

@aliams - can you review these changes?

@brettz9
Copy link
Contributor

brettz9 commented Feb 15, 2017

Realized I have a few more questions that may be somewhat interconnected if you want them here or before completing the PR:

  1. Should the second step of "convert a value to a multiEntry key", namely:

Otherwise, return the result of running the steps to convert a value to a key with argument input.

become:

Otherwise, return the result of running the steps to convert a value to a key with argument input. Rethrow any exceptions.

...or is the rethrowing somehow assumed with "return"?

  1. For "extract a key from a value using a key path", should the second step, namely:

If r is failure, return failure.

be followed by:

If r is invalid, return invalid.

(or an assertion if this is not possible as one might think could occur given that "evaluate a key path on a value" recurses back to these steps which can return "invalid")?

  1. As with Define key extraction/injection using [[DefineOwnProperty]] and [[Get]] #2, should "evaluate a key path on a value", should step 1.3.1, namely:

Let key be the result of recursively running the steps to extract a key from a value using a key path using item as keyPath and value as value.

...be followed by a condition about what to do if it is valid (or assertion that it should not be possible as one might expect given that "extract a key from a value using a key path" can return "invalid")

brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 15, 2017
    - Run non-W3C and old W3C tests, including for browser
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1047 now passing, 81 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 15, 2017
    - Run non-W3C and old W3C tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1047 now passing, 81 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 15, 2017
    - Run non-W3C and old W3C tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1047 now passing, 81 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 15, 2017
    - Run non-W3C and old W3C tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1047 now passing, 81 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 15, 2017
    - Run non-W3C and old W3C tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1047 now passing, 81 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 15, 2017
    - Run non-W3C and old W3C tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1047 now passing, 81 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 16, 2017
    - Run non-W3C and old W3C tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1047 now passing, 81 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 16, 2017
    - Run non-W3C and old W3C tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1049 now passing, 79 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 16, 2017
    - Run non-W3C and old W3C tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (Grunt): Add `dev-unicode` and `build-unicode` tasks for browser
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1049 now passing, 79 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 16, 2017
    - Run non-W3C and old W3C tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Fix: When manual rollback fails (in browser/transaction expired), just
    continue abort steps (problem had shown in an old W3C
   test `IDBObjectStore.createIndex.js` with requests after abort
   "Event ordering for ConstraintError on request"
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (Grunt): Add `dev-unicode` and `build-unicode` tasks for browser
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1049 now passing, 79 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 16, 2017
    - Run non-W3C and old W3C tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Fix: When manual rollback fails (in browser/transaction expired), just
    continue abort steps (problem had shown in an old W3C
   test `IDBObjectStore.createIndex.js` with requests after abort
   "Event ordering for ConstraintError on request"
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (Grunt): Add `dev-unicode` and `build-unicode` tasks for browser
- Testing (Fake, Mock, QUnit, Mocha): Avoid minimized file for
    now (reports line number in error message)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1049 now passing, 79 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 16, 2017
    - Run non-W3C and old W3C tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Fix: When manual rollback fails (in browser/transaction expired), just
    continue abort steps (problem had shown in an old W3C
   test `IDBObjectStore.createIndex.js` with requests after abort
   "Event ordering for ConstraintError on request"
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (Grunt/npm): Add `dev-unicode` and `build-unicode` tasks for browser
- Testing (Fake, Mock, QUnit, Mocha): Avoid minimized file for
    now (reports line number in error message)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1049 now passing, 79 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 16, 2017
    - Run non-W3C and old W3C tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Fix: When manual rollback fails (in browser/transaction expired), just
    continue abort steps (problem had shown in an old W3C
   test `IDBObjectStore.createIndex.js` with requests after abort
   "Event ordering for ConstraintError on request"
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (Grunt/npm): Add `dev-unicode` and `build-unicode` tasks for browser
- Testing (Fake, Mock, QUnit, Mocha): Avoid minimized file for
    now (reports line number in error message)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1049 now passing, 79 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 16, 2017
    - Fix failing mock test and re-run tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Fix: When manual rollback fails (in browser/transaction expired), just
    continue abort steps (problem had shown in an old W3C
   test `IDBObjectStore.createIndex.js` with requests after abort
   "Event ordering for ConstraintError on request"
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (Grunt/npm): Add `dev-unicode` and `build-unicode` tasks for browser
- Testing (Fake, Mock, QUnit, Mocha): Avoid minimized file for
    now (reports line number in error message)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1049 now passing, 79 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 16, 2017
    - Fix failing mock test and re-run tests, including for browser
    - Report back to close indexeddbshim#267 (noting indexeddbshim#285, 286), indexeddbshim#236, indexeddbshim#211
- Known regression: In switching Sca implementation (avoiding `eval`
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Fix: When manual rollback fails (in browser/transaction expired), just
    continue abort steps (problem had shown in an old W3C
   test `IDBObjectStore.createIndex.js` with requests after abort
   "Event ordering for ConstraintError on request"
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (Grunt/npm): Add `dev-unicode` and `build-unicode` tasks for browser
- Testing (Fake, Mock, QUnit, Mocha): Avoid minimized file for
    now (reports line number in error message)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1049 now passing, 79 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
brettz9 added a commit to brettz9/IndexedDBShim that referenced this pull request Feb 16, 2017
   and other improvements), removed (async) capability for
   representing `Blob`s (and `File`/`FileList`?) in values; should
   revisit when fixing other known binary issues; per spec, will need to
   report errors synchronously as possible, so either use deprecated
   sync XHR and disparaged `readFileSync` or give caveat of not
   catching errors for such types on time.
- Possible fix: Avoid problems with `websql` inclusion in Node
    (courtesy Erik Vold)
- Fix regression: re: `null` escaping of values beginning with 0
- Fix: Cause comparisons/storage of arrays to anticipate
     their higher priority over binary (arrays already existing in storage
     will not benefit from this until re-encoded)
- Fix: Improve evaluate key path splitting of identifier algorithm
- Fix: Ensure extraction of key value from value using key path algorithm
   is applied during ignoring of bad indexes of storage and during
   checks for storing operations
- Fix: Clone before checking against key path (`IDBObjectStore`
     (`put`, `add`) and `IDBCursor.update`)
- Fix: Avoid `eval()` in cloning (issue indexeddbshim#211, indexeddbshim#236)
- Fix: Support cyclic values via typeson/typeson-registry (indexeddbshim#267)
- Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
     `get*`) range validation
- Fix: Disallow invocation of `webkitGetDatabaseNames` on
     `IDBFactory.prototype`
- Fix: Throw synchronously if won't be able to inject into a value (thereby
    avoiding the need to check during the injection); assumes
    PR w3c/IndexedDB#146
- Fix: Make `DataError` message more accurate for cursor key path
     resolution failures
- Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
     per spec even though not changing the current number
- Fix: Allow iterables where `sequence<DOMString>` is accepted
    (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
    `IDBDatabase.transaction`)
- Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
    object when `keyPath` is `undefined`
- Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
    iterables
- Fix: Tighten up `DOMException` shim to support legacy constants per
   W3C tests and better follow W3C interface expectations
- Fix: Improve precision of `util.isFile` and have
    `util.isBlob` fail with files but support non-file Blobs
- Fix: When manual rollback fails (in browser/transaction expired), just
    continue abort steps (problem had shown in an old W3C
   test `IDBObjectStore.createIndex.js` with requests after abort
   "Event ordering for ConstraintError on request"
- Optimization: Avoid redundant key->value checks and redundant cloning
- Optimization: Avoid cloning key when already a primitive
- Refactoring (SQL): Quoting columns consistently for SQLite
- Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
- Refactoring (spec parity): Use same naming/return of methods in spec
- Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
- Refactoring (spec parity): Extract steps for storing a record (affecting
     `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
- Refactoring (spec parity): Perform auto-increment in spec order (should be of
    no consequence to the user, however)
- Refactoring: Avoid `cyclonejs` dependency (given need for encoding too)
- Testing (Grunt/npm): Add `dev-unicode` and `build-unicode` tasks for browser
- Testing (Fake, Mock, QUnit, Mocha): Avoid minimized file for
    now (reports line number in error message)
- Testing (W3C): Add w3c-blob to W3C testing environment; add empty `File`
    to avoid test non-completion
- Testing (W3C): Tighten up interface set-up in for `DOMStringList`,
    `Event`, `CustomEvent`, `EventTarget`; add in empty `TreeWalker`
- Testing (W3C): Add `exception` tests for `DOMException` constructor
   and constants tests (passing all); also added more `event` tests (now
   failing 5 apparently due to Node bug:
    jsdom/jsdom#1720 (comment) )
- Testing (W3C): Add new W3C tests but exclude recent test addition,
    `idb-binary-key-roundtrip.js` which has an apparent bug:
    web-platform-tests/wpt#4817
(W3C Tests: Out of 1129 tests:
    1048 now passing, 80 failing, 1 Timing out, 0 Not running)
(W3C Tests: 277/312 files without error, 3 files excluded)
@brettz9
Copy link
Contributor

brettz9 commented Feb 16, 2017

And though for a different algorithm, one other little spec issue:

Let octets be the result of running the steps to get a copy of the bytes held by the buffer source value.

ought to be:

Let octets be the result of running the steps to get a copy of the bytes held by the buffer source input.

@inexorabletash
Copy link
Member Author

  1. Should the second step of "convert a value to a multiEntry key"....

Fixed.

  1. For "extract a key from a value using a key path" ...
  1. As with Define key extraction/injection using [[DefineOwnProperty]] and [[Get]] #2, should "evaluate a key path on a value", should step 1.3.1...

That should recurse to "evaluate" directly, not "extract". Fixed.

held by the buffer source input.

Fixed.

@brettz9
Copy link
Contributor

brettz9 commented Feb 18, 2017

Excellent, thanks! LGTM...

@inexorabletash inexorabletash force-pushed the simplify-steps branch 2 times, most recently from 0dfa19b to 1c84c8a Compare February 24, 2017 18:41
@inexorabletash inexorabletash force-pushed the simplify-steps branch 3 times, most recently from d2ab004 to 174e11d Compare March 7, 2017 00:02
4ba54e1
Fixes for 'steps for storing'

0dfa19b
Fix a few more nits
@@ -6419,8 +6465,7 @@ as follows. The algorithm takes a |value|, a |key| and a |keyPath|.
4. For each remaining |identifier| in |identifiers|, run these
substeps:

1. If |value| is not an [=Object=] object or an [=Array=]
object, then [=throw=] a "{{DataError}}" {{DOMException}}.
1. Assert: |value| is an [=Object=] or an [=Array=].
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember we explicitly wanted to throw a DOMException in this case. Does asserting give us the same result here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the comment below that

Assertions can be made in the above steps because this algorithm is
only applied to values that are the output of StructuredClone,
and the steps to [=check that a key could be injected into a value=] have
been run.

The latter steps to "check that a key could be injected into a value" were added (prior to these steps) so that throwing would occur synchronously as opposed to within these record storing steps you have highlighted where they would be occurring asynchronously with the request (and where throwing would not make sense).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. "Assert" is just a guide to implementers to help with the readability of algorithms. Throwing required breaking out the steps separately, as @brettz9 clarifies.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @brettz9 and @inexorabletash for clarifying!

Copy link

@aliams aliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking this over, nothing sticks out to me as a blocker to merging.

@inexorabletash inexorabletash merged commit 96cb6c5 into gh-pages Mar 9, 2017
@inexorabletash inexorabletash deleted the simplify-steps branch March 9, 2017 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants