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

Issue 2845463002: gin: Create a DataObjectBuilder class to help create simple data objects. (Closed)

Created:
3 years, 8 months ago by jbroman
Modified:
3 years, 7 months ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

gin: Create a DataObjectBuilder class to help create simple data objects. It's easy to get this wrong and use Set instead, which can invoke author script in unexpected places. This is a convenient helper that does the right thing, similar to blink::V8ObjectBuilder. A unit test and two "real-world" uses are included. BUG= Review-Url: https://codereview.chromium.org/2845463002 Cr-Commit-Position: refs/heads/master@{#467711} Committed: https://chromium.googlesource.com/chromium/src/+/5967a866a003e060b471aa2686de87d5adb9bde4

Patch Set 1 #

Patch Set 2 : skia benchmarking use #

Patch Set 3 : data_object_builder.cc #

Total comments: 27

Patch Set 4 : devlin #

Total comments: 2

Patch Set 5 : devlin, jochen #

Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -18 lines) Patch
M content/renderer/skia_benchmarking_extension.cc View 1 2 3 4 2 chunks +7 lines, -10 lines 0 comments Download
M extensions/renderer/binding_generating_native_handler.cc View 1 2 3 4 4 chunks +4 lines, -8 lines 0 comments Download
M gin/BUILD.gn View 2 chunks +3 lines, -0 lines 0 comments Download
A gin/data_object_builder.h View 1 2 3 4 1 chunk +69 lines, -0 lines 0 comments Download
A gin/data_object_builder.cc View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
A gin/data_object_builder_unittest.cc View 1 2 3 4 1 chunk +119 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (17 generated)
jbroman
3 years, 8 months ago (2017-04-26 03:16:03 UTC) #10
Devlin
Nice! A number of small nits/suggestions, but nothing major. Also, you know this code much ...
3 years, 8 months ago (2017-04-26 15:50:32 UTC) #11
jbroman
https://codereview.chromium.org/2845463002/diff/40001/gin/data_object_builder.cc File gin/data_object_builder.cc (right): https://codereview.chromium.org/2845463002/diff/40001/gin/data_object_builder.cc#newcode11 gin/data_object_builder.cc:11: context_(isolate->GetCurrentContext()), On 2017/04/26 at 15:50:31, Devlin wrote: > Would ...
3 years, 8 months ago (2017-04-26 17:47:32 UTC) #13
Devlin
https://codereview.chromium.org/2845463002/diff/40001/gin/data_object_builder.cc File gin/data_object_builder.cc (right): https://codereview.chromium.org/2845463002/diff/40001/gin/data_object_builder.cc#newcode11 gin/data_object_builder.cc:11: context_(isolate->GetCurrentContext()), On 2017/04/26 17:47:31, jbroman wrote: > On 2017/04/26 ...
3 years, 8 months ago (2017-04-26 18:30:24 UTC) #15
jochen (gone - plz use gerrit)
agree that Build() would be more in line than Finish() otherwise lgtm
3 years, 8 months ago (2017-04-26 21:51:37 UTC) #18
jbroman
https://codereview.chromium.org/2845463002/diff/40001/gin/data_object_builder.h File gin/data_object_builder.h (right): https://codereview.chromium.org/2845463002/diff/40001/gin/data_object_builder.h#newcode36 gin/data_object_builder.h:36: v8::Local<v8::String> v8_key = StringToSymbol(isolate_, key); On 2017/04/26 at 18:30:23, ...
3 years, 7 months ago (2017-04-27 15:26:31 UTC) #19
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/2845463002/80001
3 years, 7 months ago (2017-04-27 15:27:58 UTC) #22
commit-bot: I haz the power
3 years, 7 months ago (2017-04-27 16:53:28 UTC) #25
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/5967a866a003e060b471aa2686de...

Powered by Google App Engine
This is Rietveld 408576698