Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Issue 1480363003: Eliminate [LegacyInterfaceTypeChecking] for modules/filesystem bindings (Closed)

Created:
5 years ago by jsbell
Modified:
5 years ago
Reviewers:
philipj_slow
CC:
chromium-reviews, caseq+blink_chromium.org, tzik, nhiroki, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, lushnikov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, sergeyv+blink_chromium.org, kinuko+fileapi, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Eliminate [LegacyInterfaceTypeChecking] for modules/filesystem bindings Let bindings generate a TypeError, rather than the module code producing a TypeMismatchError or InvalidModificationError, if null is passed for non-nullable interface arguments. This was previously untested, so new tests were added for the async API and sync API (in worker) cases. (Some async cases are not modified in this CL, as there is a behavior change we want to tackle separately.) BUG=561338 R=philipj@opera.com Committed: https://crrev.com/d58c42982f7f11450533250d8deedea8afc89f9e Cr-Commit-Position: refs/heads/master@{#363008}

Patch Set 1 #

Patch Set 2 : Add assertions about writer error state #

Total comments: 10

Patch Set 3 : Review feedback #

Patch Set 4 : Scope to safe changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -14 lines) Patch
A third_party/WebKit/LayoutTests/fast/filesystem/null-arguments.html View 1 2 3 1 chunk +40 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/filesystem/null-arguments-expected.txt View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/filesystem/resources/null-arguments-worker.js View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/filesystem/workers/null-arguments.html View 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/fast/filesystem/workers/null-arguments-expected.txt View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/filesystem/DevToolsHostFileSystem.idl View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/filesystem/EntrySync.idl View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/filesystem/FileWriter.cpp View 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/filesystem/FileWriter.idl View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/filesystem/FileWriterSync.cpp View 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/filesystem/FileWriterSync.idl View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 19 (6 generated)
jsbell
philipj@ - please take a look?
5 years ago (2015-12-01 00:24:44 UTC) #2
philipj_slow
Yay, thanks for fixing! LGTM with small nits. https://codereview.chromium.org/1480363003/diff/20001/third_party/WebKit/LayoutTests/fast/filesystem/null-arguments.html File third_party/WebKit/LayoutTests/fast/filesystem/null-arguments.html (right): https://codereview.chromium.org/1480363003/diff/20001/third_party/WebKit/LayoutTests/fast/filesystem/null-arguments.html#newcode12 third_party/WebKit/LayoutTests/fast/filesystem/null-arguments.html:12: debug("Error ...
5 years ago (2015-12-01 09:00:25 UTC) #4
jsbell
https://codereview.chromium.org/1480363003/diff/20001/third_party/WebKit/LayoutTests/fast/filesystem/workers/null-arguments-expected.txt File third_party/WebKit/LayoutTests/fast/filesystem/workers/null-arguments-expected.txt (right): https://codereview.chromium.org/1480363003/diff/20001/third_party/WebKit/LayoutTests/fast/filesystem/workers/null-arguments-expected.txt#newcode7 third_party/WebKit/LayoutTests/fast/filesystem/workers/null-arguments-expected.txt:7: PASS [Worker] fileSystem.root.moveTo(null) threw exception TypeError: Failed to execute ...
5 years ago (2015-12-01 18:19:44 UTC) #5
philipj_slow
https://codereview.chromium.org/1480363003/diff/20001/third_party/WebKit/LayoutTests/fast/filesystem/workers/null-arguments-expected.txt File third_party/WebKit/LayoutTests/fast/filesystem/workers/null-arguments-expected.txt (right): https://codereview.chromium.org/1480363003/diff/20001/third_party/WebKit/LayoutTests/fast/filesystem/workers/null-arguments-expected.txt#newcode7 third_party/WebKit/LayoutTests/fast/filesystem/workers/null-arguments-expected.txt:7: PASS [Worker] fileSystem.root.moveTo(null) threw exception TypeError: Failed to execute ...
5 years ago (2015-12-01 19:00:58 UTC) #6
jsbell
So there's a wrinkle... The moveTo/copyTo methods on Entry (not EntrySync) report invalid arguments asynchronously ...
5 years ago (2015-12-01 19:50:32 UTC) #7
philipj_slow
On 2015/12/01 19:50:32, jsbell wrote: > So there's a wrinkle... > > The moveTo/copyTo methods ...
5 years ago (2015-12-01 20:12:20 UTC) #8
philipj_slow
Um, actually, moveTo/copyTo already throw exceptions if the callbacks are anything other than null, undefined ...
5 years ago (2015-12-01 22:13:29 UTC) #9
jsbell
This removes the changes for the async moveTo/copyTo methods. Without the code changes: Sync moveTo() ...
5 years ago (2015-12-02 22:51:13 UTC) #10
philipj_slow
On 2015/12/02 22:51:13, jsbell wrote: > This removes the changes for the async moveTo/copyTo methods. ...
5 years ago (2015-12-03 09:21:37 UTC) #11
jsbell
On 2015/12/03 09:21:37, philipj wrote: > On 2015/12/02 22:51:13, jsbell wrote: > > This removes ...
5 years ago (2015-12-03 17:04:57 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1480363003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1480363003/60001
5 years ago (2015-12-03 17:06:09 UTC) #15
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years ago (2015-12-03 18:10:08 UTC) #17
commit-bot: I haz the power
5 years ago (2015-12-03 18:10:48 UTC) #19
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/d58c42982f7f11450533250d8deedea8afc89f9e
Cr-Commit-Position: refs/heads/master@{#363008}

Powered by Google App Engine
This is Rietveld 408576698