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

Issue 2245003002: [Binding] Load 4 bytes to detect BOM (Closed)

Created:
4 years, 4 months ago by peria
Modified:
4 years, 4 months ago
CC:
chromium-reviews, blink-reviews, blink-reviews-bindings_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Load 4 bytes to detect BOM. It is guaranteed that the shared buffer contains s_smallScriptThreashold (=30*1024) bytes, but it is not guaranteed that a chunked segment holds >=2 bytes. Before this CL, we might hit such a short segment and failed to detect BOM of the script. This CL copies leading 4 bytes, which is needed and enough to detect BOM, and avoids to lack data. BUG=634935 Committed: https://crrev.com/58cdacd743ce7c608a0284906549366a211df0f5 Cr-Commit-Position: refs/heads/master@{#412206}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Create a method in SharedBuffer #

Patch Set 3 : Split CL #

Total comments: 3

Patch Set 4 : Fix compile error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -3 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp View 1 2 3 1 chunk +7 lines, -3 lines 0 comments Download

Messages

Total messages: 25 (9 generated)
peria
tzik@ Could you check if this CL goes to a right direction?
4 years, 4 months ago (2016-08-15 05:48:48 UTC) #2
tzik
https://codereview.chromium.org/2245003002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp File third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp (right): https://codereview.chromium.org/2245003002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp#newcode502 third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp:502: char maybeBom[length + 1] = {}; nit: s/Bom/BOM/ for ...
4 years, 4 months ago (2016-08-15 06:02:22 UTC) #3
peria
https://codereview.chromium.org/2245003002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp File third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp (right): https://codereview.chromium.org/2245003002/diff/1/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp#newcode502 third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp:502: char maybeBom[length + 1] = {}; On 2016/08/15 06:02:22, ...
4 years, 4 months ago (2016-08-15 07:02:03 UTC) #5
peria
add yukishiino@ in reviewers
4 years, 4 months ago (2016-08-15 07:03:07 UTC) #7
haraken
LGTM +marja FYI
4 years, 4 months ago (2016-08-15 07:03:43 UTC) #9
Yuki
lgtm
4 years, 4 months ago (2016-08-15 07:11:41 UTC) #10
peria
Thank you for the review, but I split the part of SharedBuffer into another CL. ...
4 years, 4 months ago (2016-08-15 07:24:53 UTC) #11
tzik
lgtm
4 years, 4 months ago (2016-08-15 07:32:35 UTC) #12
kouhei (in TOK)
https://codereview.chromium.org/2245003002/diff/40001/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp File third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp (right): https://codereview.chromium.org/2245003002/diff/40001/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp#newcode500 third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp:500: // than enough for detecting a BOM. Let's update ...
4 years, 4 months ago (2016-08-15 07:43:49 UTC) #14
kouhei (in TOK)
https://codereview.chromium.org/2245003002/diff/40001/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp File third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp (right): https://codereview.chromium.org/2245003002/diff/40001/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp#newcode500 third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp:500: // than enough for detecting a BOM. On 2016/08/15 ...
4 years, 4 months ago (2016-08-15 08:19:14 UTC) #15
peria
https://codereview.chromium.org/2245003002/diff/40001/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp File third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp (right): https://codereview.chromium.org/2245003002/diff/40001/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp#newcode500 third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp:500: // than enough for detecting a BOM. On 2016/08/15 ...
4 years, 4 months ago (2016-08-15 08:28:38 UTC) #16
peria
I will commit this after marja@'s review.
4 years, 4 months ago (2016-08-15 15:03:04 UTC) #17
marja
lgtm
4 years, 4 months ago (2016-08-16 07:25:36 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2245003002/60001
4 years, 4 months ago (2016-08-16 07:26:29 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-08-16 10:28:16 UTC) #23
commit-bot: I haz the power
4 years, 4 months ago (2016-08-16 10:30:29 UTC) #25
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/58cdacd743ce7c608a0284906549366a211df0f5
Cr-Commit-Position: refs/heads/master@{#412206}

Powered by Google App Engine
This is Rietveld 408576698