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

Issue 1027593003: bindings: Use Maybe version of v8::String::NewFromUtf8() (Closed)

Created:
5 years, 9 months ago by bashi
Modified:
5 years, 9 months ago
CC:
blink-reviews, eustas+blink_chromium.org, caseq+blink_chromium.org, arv+blink, vivekg_samsung, malch+blink_chromium.org, vivekg, yurys+blink_chromium.org, lushnikov+blink_chromium.org, loislo+blink_chromium.org, pfeldman+blink_chromium.org, blink-reviews-bindings_chromium.org, devtools-reviews_chromium.org, apavlov+blink_chromium.org, sergeyv+blink_chromium.org, aandrey+blink_chromium.org, kozyatinskiy+blink_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

bindings: Use Maybe version of v8::String::NewFromUtf8() Also add v8NormalString() which returns the result of v8::String::NewFromUtf8(). This function ensures that the value is not empty. Replace existing v8::String::NewFromUtf8() calls with this function. BUG=462402 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192406

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Patch Set 3 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -17 lines) Patch
M Source/bindings/core/v8/ScriptValueSerializer.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/V8Binding.h View 1 2 1 chunk +5 lines, -8 lines 3 comments Download
M Source/bindings/core/v8/V8DOMConfiguration.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/V8NPUtils.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/testing/v8/WebCoreTestSupport.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/crypto/CryptoResultImpl.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/fetch/Body.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/web/InspectorOverlayImpl.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebDevToolsFrontendImpl.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/web/tests/CustomEventTest.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 41 (7 generated)
bashi
PTAL? No hurry, I won't reply review comments until Monday :) https://codereview.chromium.org/1027593003/diff/1/Source/bindings/core/v8/V8Binding.h File Source/bindings/core/v8/V8Binding.h (left): ...
5 years, 9 months ago (2015-03-20 08:16:45 UTC) #2
haraken
LGTM https://codereview.chromium.org/1027593003/diff/1/Source/bindings/core/v8/V8Binding.h File Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/1027593003/diff/1/Source/bindings/core/v8/V8Binding.h#newcode354 Source/bindings/core/v8/V8Binding.h:354: if (LIKELY(v8::String::NewFromUtf8(isolate, str, v8::NewStringType::kNormal, length).ToLocal(&value))) On 2015/03/20 08:16:44, ...
5 years, 9 months ago (2015-03-20 09:46:08 UTC) #3
yurys
Can you please revert changes in the following files in favor of using v8.h APIs ...
5 years, 9 months ago (2015-03-20 11:00:47 UTC) #5
bashi
On 2015/03/20 11:00:47, yurys wrote: > Can you please revert changes in the following files ...
5 years, 9 months ago (2015-03-23 01:26:26 UTC) #8
yurys
On 2015/03/23 01:26:26, bashi1 wrote: > On 2015/03/20 11:00:47, yurys wrote: > > Can you ...
5 years, 9 months ago (2015-03-23 07:29:06 UTC) #9
yurys
On 2015/03/23 07:29:06, yurys wrote: > On 2015/03/23 01:26:26, bashi1 wrote: > > On 2015/03/20 ...
5 years, 9 months ago (2015-03-23 07:30:26 UTC) #10
Yuki
It seems a little confusing that we have following three functions. - v8String() - v8NormalString() ...
5 years, 9 months ago (2015-03-23 08:52:51 UTC) #11
haraken
On 2015/03/23 08:52:51, Yuki wrote: > It seems a little confusing that we have following ...
5 years, 9 months ago (2015-03-23 08:55:14 UTC) #12
bashi
On 2015/03/23 08:55:14, haraken wrote: > On 2015/03/23 08:52:51, Yuki wrote: > > It seems ...
5 years, 9 months ago (2015-03-23 23:42:31 UTC) #13
bashi
On 2015/03/23 07:30:26, yurys wrote: > On 2015/03/23 07:29:06, yurys wrote: > > On 2015/03/23 ...
5 years, 9 months ago (2015-03-23 23:54:01 UTC) #14
haraken
On 2015/03/23 23:42:31, bashi1 wrote: > On 2015/03/23 08:55:14, haraken wrote: > > On 2015/03/23 ...
5 years, 9 months ago (2015-03-24 00:51:17 UTC) #15
bashi
On 2015/03/24 00:51:17, haraken wrote: > On 2015/03/23 23:42:31, bashi1 wrote: > > On 2015/03/23 ...
5 years, 9 months ago (2015-03-24 01:07:39 UTC) #16
haraken
On 2015/03/24 01:07:39, bashi1 wrote: > On 2015/03/24 00:51:17, haraken wrote: > > On 2015/03/23 ...
5 years, 9 months ago (2015-03-24 01:25:52 UTC) #17
bashi
On 2015/03/24 01:25:52, haraken wrote: > On 2015/03/24 01:07:39, bashi1 wrote: > > On 2015/03/24 ...
5 years, 9 months ago (2015-03-24 01:28:49 UTC) #18
haraken
On 2015/03/24 01:28:49, bashi1 wrote: > On 2015/03/24 01:25:52, haraken wrote: > > On 2015/03/24 ...
5 years, 9 months ago (2015-03-24 01:39:42 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1027593003/40001
5 years, 9 months ago (2015-03-24 02:48:18 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://src.chromium.org/viewvc/blink?view=rev&revision=192406
5 years, 9 months ago (2015-03-24 02:51:40 UTC) #22
yurys
On 2015/03/23 23:54:01, bashi1 wrote: > On 2015/03/23 07:30:26, yurys wrote: > > On 2015/03/23 ...
5 years, 9 months ago (2015-03-24 13:31:09 UTC) #23
bashi
On 2015/03/24 13:31:09, yurys wrote: > On 2015/03/23 23:54:01, bashi1 wrote: > > On 2015/03/23 ...
5 years, 9 months ago (2015-03-24 23:09:39 UTC) #24
pfeldman
I share Yury's sentiment and think this should be reverted. As I read it, it ...
5 years, 9 months ago (2015-03-25 05:33:24 UTC) #26
bashi
On 2015/03/25 05:33:24, pfeldman wrote: > I share Yury's sentiment and think this should be ...
5 years, 9 months ago (2015-03-25 05:43:35 UTC) #27
pfeldman
https://codereview.chromium.org/1027593003/diff/40001/Source/bindings/core/v8/V8Binding.h File Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/1027593003/diff/40001/Source/bindings/core/v8/V8Binding.h#newcode356 Source/bindings/core/v8/V8Binding.h:356: return v8::String::Empty(isolate); At this point we know that there ...
5 years, 9 months ago (2015-03-25 05:43:37 UTC) #29
pfeldman
> Without this guarantee, all call sites must be > careful whether an empty value ...
5 years, 9 months ago (2015-03-25 05:48:55 UTC) #30
bashi
https://codereview.chromium.org/1027593003/diff/40001/Source/bindings/core/v8/V8Binding.h File Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/1027593003/diff/40001/Source/bindings/core/v8/V8Binding.h#newcode356 Source/bindings/core/v8/V8Binding.h:356: return v8::String::Empty(isolate); On 2015/03/25 05:43:37, pfeldman wrote: > At ...
5 years, 9 months ago (2015-03-25 05:50:10 UTC) #31
pfeldman
> OK, How about having RELEASE_ASSERT() here then? That'd be a great solution.
5 years, 9 months ago (2015-03-25 05:51:36 UTC) #32
pfeldman
(we need to make sure there are no call sites that intentionally feed v8 with ...
5 years, 9 months ago (2015-03-25 05:53:52 UTC) #33
bashi
On 2015/03/25 05:51:36, pfeldman_ooo_mar_31 wrote: > > OK, How about having RELEASE_ASSERT() here then? > ...
5 years, 9 months ago (2015-03-25 06:01:33 UTC) #34
yurys
https://codereview.chromium.org/1027593003/diff/40001/Source/bindings/core/v8/V8Binding.h File Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/1027593003/diff/40001/Source/bindings/core/v8/V8Binding.h#newcode356 Source/bindings/core/v8/V8Binding.h:356: return v8::String::Empty(isolate); On 2015/03/25 05:50:09, bashi1 wrote: > On ...
5 years, 9 months ago (2015-03-25 07:07:22 UTC) #35
bashi
On 2015/03/25 07:07:22, yurys wrote: > https://codereview.chromium.org/1027593003/diff/40001/Source/bindings/core/v8/V8Binding.h > File Source/bindings/core/v8/V8Binding.h (right): > > https://codereview.chromium.org/1027593003/diff/40001/Source/bindings/core/v8/V8Binding.h#newcode356 > ...
5 years, 9 months ago (2015-03-25 07:16:39 UTC) #36
jochen (gone - plz use gerrit)
Methods that invoke V8 APIs that can throw should either - return a Maybe value ...
5 years, 9 months ago (2015-03-25 07:19:46 UTC) #37
dcarney
for the string::New* functions, no exception will be thrown because I haven't yet decided how ...
5 years, 9 months ago (2015-03-25 07:56:25 UTC) #38
yurys
On 2015/03/25 07:56:25, dcarney wrote: > for the string::New* functions, no exception will be thrown ...
5 years, 9 months ago (2015-03-25 08:02:01 UTC) #39
haraken
On 2015/03/25 07:56:25, dcarney wrote: > for the string::New* functions, no exception will be thrown ...
5 years, 9 months ago (2015-03-25 08:43:07 UTC) #40
bashi
5 years, 9 months ago (2015-03-25 10:55:59 UTC) #41
Message was sent while issue was closed.
For the record, added RELEASE_ASSERT_NOT_REACHED().
https://codereview.chromium.org/1032053003/

Powered by Google App Engine
This is Rietveld 408576698