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

Issue 17035004: [ABANDONED] Introduce Promise example implementation written in JavaScript. (Closed)

Created:
7 years, 6 months ago by yhirano
Modified:
7 years, 6 months ago
CC:
blink-reviews, jsbell+bindings_chromium.org, eae+blinkwatch, marja+watch_chromium.org, dglazkov+blink, adamk+blink_chromium.org, haraken, Nate Chapin, marja
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Introduce Promise example implementation written in JavaScript. We would like to introduce DOM/Promises[1] written in JavaScript. Since it is experimental, we would like to land the utilities code first. This CL introduces Promise, but it has only example methods. [1] https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/9q5kP0eMQc8 BUG=243345 TESTS=fast/js/Promise-get.html

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 8

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 24

Patch Set 8 : #

Total comments: 10

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+466 lines, -39 lines) Patch
A LayoutTests/fast/js/Promise-concat.html View 1 2 3 4 5 6 7 8 1 chunk +20 lines, -0 lines 0 comments Download
A + LayoutTests/fast/js/Promise-concat-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
A LayoutTests/fast/js/Promise-define-setter.html View 1 2 3 4 5 6 7 8 1 chunk +23 lines, -0 lines 0 comments Download
A + LayoutTests/fast/js/Promise-define-setter-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
A LayoutTests/fast/js/Promise-get.html View 1 chunk +29 lines, -0 lines 0 comments Download
A LayoutTests/fast/js/Promise-get-expected.txt View 1 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/fast/js/Promise-overwrite-constructor.html View 1 2 3 4 5 6 7 8 1 chunk +25 lines, -0 lines 0 comments Download
A + LayoutTests/fast/js/Promise-overwrite-constructor-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -3 lines 0 comments Download
M Source/bindings/bindings.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/v8/V8DOMWindowShell.h View 1 2 3 4 5 6 7 8 2 chunks +18 lines, -0 lines 0 comments Download
M Source/bindings/v8/V8DOMWindowShell.cpp View 1 2 3 4 5 6 7 8 6 chunks +43 lines, -0 lines 0 comments Download
M Source/bindings/v8/V8HiddenPropertyName.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/v8/V8ScriptRunner.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -1 line 0 comments Download
M Source/bindings/v8/V8ScriptRunner.cpp View 1 2 3 4 5 6 7 8 3 chunks +108 lines, -0 lines 0 comments Download
A Source/bindings/v8/custom/V8PromiseCustom.cpp View 1 2 3 4 5 6 7 8 1 chunk +100 lines, -0 lines 0 comments Download
M Source/core/core.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 3 chunks +5 lines, -0 lines 0 comments Download
M Source/core/core_derived_sources.gyp View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
A + Source/core/dom/Promise.h View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -8 lines 0 comments Download
A + Source/core/dom/Promise.idl View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -4 lines 0 comments Download
A + Source/core/dom/Promise.js View 1 2 3 4 5 6 7 8 1 chunk +23 lines, -19 lines 0 comments Download
M Source/core/page/RuntimeEnabledFeatures.in View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
yhirano
Split from https://codereview.chromium.org/16838012/ .
7 years, 6 months ago (2013-06-14 06:57:26 UTC) #1
yhirano
abarth@'s comment at https://codereview.chromium.org/16838012/ . I will fix them soon. I need to study this ...
7 years, 6 months ago (2013-06-14 07:13:31 UTC) #2
esprehn_google.com
On Fri, Jun 14, 2013 at 12:13 AM, <yhirano@chromium.org> wrote: > ... > > https://codereview.chromium.**org/16838012/diff/15001/** ...
7 years, 6 months ago (2013-06-14 07:27:56 UTC) #3
yhirano
On 2013/06/14 07:13:31, yhirano wrote: > abarth@'s comment at https://codereview.chromium.org/16838012/ . I will fix them ...
7 years, 6 months ago (2013-06-17 05:49:22 UTC) #4
yhirano
marja, > Please also make sure that your patch builds if you remove "#define V8_USE_UNSAFE_HANDLES" ...
7 years, 6 months ago (2013-06-17 05:56:01 UTC) #5
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/17035004/diff/17001/Source/bindings/v8/V8PromiseUtilities.cpp File Source/bindings/v8/V8PromiseUtilities.cpp (right): https://codereview.chromium.org/17035004/diff/17001/Source/bindings/v8/V8PromiseUtilities.cpp#newcode72 Source/bindings/v8/V8PromiseUtilities.cpp:72: placeholder->SetHiddenValue(V8HiddenPropertyName::jsConstructor(), value); check return value? https://codereview.chromium.org/17035004/diff/17001/Source/bindings/v8/V8PromiseUtilities.cpp#newcode95 Source/bindings/v8/V8PromiseUtilities.cpp:95: v8::Handle<v8::Value> that ...
7 years, 6 months ago (2013-06-17 07:51:57 UTC) #6
yhirano
I fixed some error messages and remove unnecessary code. https://codereview.chromium.org/17035004/diff/17001/Source/bindings/v8/V8PromiseUtilities.cpp File Source/bindings/v8/V8PromiseUtilities.cpp (right): https://codereview.chromium.org/17035004/diff/17001/Source/bindings/v8/V8PromiseUtilities.cpp#newcode72 Source/bindings/v8/V8PromiseUtilities.cpp:72: ...
7 years, 6 months ago (2013-06-17 08:39:22 UTC) #7
abarth-chromium
https://codereview.chromium.org/17035004/diff/32003/Source/bindings/v8/V8HiddenPropertyName.h File Source/bindings/v8/V8HiddenPropertyName.h (right): https://codereview.chromium.org/17035004/diff/32003/Source/bindings/v8/V8HiddenPropertyName.h#newcode44 Source/bindings/v8/V8HiddenPropertyName.h:44: V(jsConstructor) \ Why not just "constructor" ? https://codereview.chromium.org/17035004/diff/32003/Source/bindings/v8/V8PromiseUtilities.cpp File ...
7 years, 6 months ago (2013-06-17 18:05:06 UTC) #8
abarth-chromium
Rather than having a "placeholder" value in the global object, we should make the Promise ...
7 years, 6 months ago (2013-06-17 18:06:41 UTC) #9
yhirano
On 2013/06/17 18:06:41, abarth wrote: > Rather than having a "placeholder" value in the global ...
7 years, 6 months ago (2013-06-18 06:01:26 UTC) #10
abarth-chromium
On 2013/06/18 06:01:26, yhirano wrote: > If we choose the way, we don't need Promise.idl ...
7 years, 6 months ago (2013-06-18 07:56:29 UTC) #11
yhirano
On 2013/06/18 07:56:29, abarth wrote: > On 2013/06/18 06:01:26, yhirano wrote: > > If we ...
7 years, 6 months ago (2013-06-18 08:44:49 UTC) #12
yhirano
For the IDL processor: I would like to write custom C++ implementation in this and ...
7 years, 6 months ago (2013-06-18 08:56:15 UTC) #13
abarth-chromium
On 2013/06/18 08:56:15, yhirano wrote: > https://codereview.chromium.org/17035004/diff/32003/Source/bindings/v8/V8PromiseUtilities.cpp#newcode85 > Source/bindings/v8/V8PromiseUtilities.cpp:85: return > constructor->Get(v8::String::NewSymbol("prototype")); > On 2013/06/17 ...
7 years, 6 months ago (2013-06-18 09:04:08 UTC) #14
abarth-chromium
https://codereview.chromium.org/17035004/diff/52001/Source/core/dom/Promise.js File Source/core/dom/Promise.js (right): https://codereview.chromium.org/17035004/diff/52001/Source/core/dom/Promise.js#newcode46 Source/core/dom/Promise.js:46: this.value = value; I'm worried that this will call ...
7 years, 6 months ago (2013-06-18 09:13:15 UTC) #15
abarth-chromium
https://codereview.chromium.org/17035004/diff/52001/Source/core/dom/Promise.js File Source/core/dom/Promise.js (right): https://codereview.chromium.org/17035004/diff/52001/Source/core/dom/Promise.js#newcode41 Source/core/dom/Promise.js:41: return new Promise(value); This calls whatever the web page ...
7 years, 6 months ago (2013-06-18 09:17:22 UTC) #16
jsbell
https://codereview.chromium.org/17035004/diff/52001/Source/core/dom/Promise.js File Source/core/dom/Promise.js (right): https://codereview.chromium.org/17035004/diff/52001/Source/core/dom/Promise.js#newcode49 Source/core/dom/Promise.js:49: $Promise.prototype = { Possibly use $Promise.prototype = Object.create(null, descriptor); ...
7 years, 6 months ago (2013-06-18 18:23:12 UTC) #17
abarth-chromium
https://codereview.chromium.org/17035004/diff/52001/Source/core/dom/Promise.js File Source/core/dom/Promise.js (right): https://codereview.chromium.org/17035004/diff/52001/Source/core/dom/Promise.js#newcode49 Source/core/dom/Promise.js:49: $Promise.prototype = { On 2013/06/18 18:23:13, jsbell wrote: > ...
7 years, 6 months ago (2013-06-18 18:41:35 UTC) #18
jsbell
https://codereview.chromium.org/17035004/diff/52001/Source/core/dom/Promise.js File Source/core/dom/Promise.js (right): https://codereview.chromium.org/17035004/diff/52001/Source/core/dom/Promise.js#newcode49 Source/core/dom/Promise.js:49: $Promise.prototype = { On 2013/06/18 18:41:35, abarth wrote: > ...
7 years, 6 months ago (2013-06-18 19:00:07 UTC) #19
esprehn
On 2013/06/18 19:00:07, jsbell wrote: > ... > > If this is run *after* user ...
7 years, 6 months ago (2013-06-18 19:08:33 UTC) #20
abarth-chromium
On 2013/06/18 19:08:33, esprehn wrote: > Always running first to be secure sounds scary. Can ...
7 years, 6 months ago (2013-06-18 19:47:00 UTC) #21
abarth-chromium
On 2013/06/18 19:47:00, abarth wrote: > On 2013/06/18 19:08:33, esprehn wrote: > > Always running ...
7 years, 6 months ago (2013-06-18 19:47:09 UTC) #22
esprehn
On 2013/06/18 19:47:00, abarth wrote: > On 2013/06/18 19:08:33, esprehn wrote: > > Always running ...
7 years, 6 months ago (2013-06-18 19:53:39 UTC) #23
abarth-chromium
On 2013/06/18 19:53:39, esprehn wrote: > I meant exposing the regexContext as a property so ...
7 years, 6 months ago (2013-06-18 20:20:18 UTC) #24
yhirano
On 2013/06/18 20:20:18, abarth wrote: > On 2013/06/18 19:53:39, esprehn wrote: > > I meant ...
7 years, 6 months ago (2013-06-19 01:09:51 UTC) #25
yhirano
I introduced another v8::Context for BlinkJS implementation. The context is shared among all BlinkJS implementation. ...
7 years, 6 months ago (2013-06-19 12:55:55 UTC) #26
abarth-chromium
On 2013/06/19 01:09:51, yhirano wrote: > I am trying to introduce another Context so that ...
7 years, 6 months ago (2013-06-19 17:41:16 UTC) #27
abarth-chromium
I don't think a JavaScript-based implementation is feasible. I'm sorry I wasn't able to foresee ...
7 years, 6 months ago (2013-06-19 17:48:49 UTC) #28
yhirano
On 2013/06/19 17:41:16, abarth wrote: > On 2013/06/19 01:09:51, yhirano wrote: > > I am ...
7 years, 6 months ago (2013-06-20 01:37:31 UTC) #29
abarth-chromium
Creating an extra context per DOMWindow will use more resources than necessary. Plus, leaking objects ...
7 years, 6 months ago (2013-06-20 01:45:17 UTC) #30
yhirano
On 2013/06/20 01:45:17, abarth wrote: > Creating an extra context per DOMWindow will use more ...
7 years, 6 months ago (2013-06-20 01:49:20 UTC) #31
abarth-chromium
On 2013/06/20 01:49:20, yhirano wrote: > I see. I will write another CL for Promise ...
7 years, 6 months ago (2013-06-20 03:17:16 UTC) #32
yhirano
I have a question. I want to introduce a class that has utility functions (e.g. ...
7 years, 6 months ago (2013-06-20 13:04:31 UTC) #33
abarth-chromium
7 years, 6 months ago (2013-06-20 16:04:22 UTC) #34
On 2013/06/20 13:04:31, yhirano wrote:
> I have a question. I want to introduce a class that has utility functions
(e.g.
> postTask) and variables (e.g. const int promisePendingStatus = 1). Do you have
> an idea of the class name?
> In the above comment, you recommended V8PromiseCustom. Did it mean that the
> class name is V8PromiseCustom, declared in V8PromiseCustom.h and implemented
in
> V8PromiseCustom.cpp with the implementation of V8Promise?

Yeah, we can try that.  We don't usually have a V8FooCustom class, but we can
have one in this case if it's helpful.

Powered by Google App Engine
This is Rietveld 408576698