* SUMMARY Improved Console Support for Promise Objects. Promises have internal state that would be useful to show in Inspector: (Table 59 — Internal Slots of Promise Instances) [[PromiseState]] - A string value that governs how a promise will react to incoming calls to its then method. - The possible values are: undefined, "pending", "fulfilled", and "rejected". [[PromiseResult]] - The value with which the promise has been fulfilled or rejected, if any. - Only meaningful if [[PromiseState]] is not "pending". [[PromiseFulfillReactions]] - A List of PromiseReaction records to be processed when/if the promise transitions from the "pending" state to the "fulfilled" state. [[PromiseRejectReactions]] - A List of PromiseReaction records to be processed when/if the promise transitions from the "pending" state to the "rejected" state.
<rdar://problem/19843138>
Created attachment 246637 [details] [PATCH] Work In Progress Work in progress patch: - First time we make sure of InjectedScriptHost.getInternalProperties - Add a way to distinguish Internal property previews from regular properties - Trivially supports [[PromiseState]] and [[PromiseResult]]. Whats next: - show the chain of reactions next (the .thens, and .catches) - discuss UI for Internal Properties in ObjectPreviews / ObjectTrees
> [[PromiseFulfillReactions]] > - A List of PromiseReaction records to be processed when/if the promise > transitions from the "pending" state to the "fulfilled" state. > > [[PromiseRejectReactions]] > - A List of PromiseReaction records to be processed when/if the promise > transitions from the "pending" state to the "rejected" state. I will handle these states in: <https://webkit.org/b/141664> Web Inspector: ES6: Improved Support for Promises - Promise Reactions For now, lets just do state / value.
Created attachment 246675 [details] [PATCH] Proposed Fix
Comment on attachment 246675 [details] [PATCH] Proposed Fix Attachment 246675 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/5867389241524224 New failing tests: inspector-protocol/runtime/getProperties.html
Created attachment 246682 [details] Archive of layout-test-results from ews102 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-mavericks Platform: Mac OS X 10.9.5
Comment on attachment 246675 [details] [PATCH] Proposed Fix Attachment 246675 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/4929187995451392 New failing tests: inspector-protocol/runtime/getProperties.html
Created attachment 246683 [details] Archive of layout-test-results from ews105 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Comment on attachment 246675 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=246675&action=review > Source/JavaScriptCore/inspector/InjectedScript.cpp:139 > - auto array = BindingTraits<Array<Inspector::Protocol::Runtime::InternalPropertyDescriptor>>::runtimeCast(WTF::move(result)); > - *properties = array->length() > 0 ? array : nullptr; > + *properties = BindingTraits<Array<Inspector::Protocol::Runtime::InternalPropertyDescriptor>>::runtimeCast(WTF::move(result)); I should revert this part for: spector-protocol/runtime/getProperties.html I wanted to always include the array, but not including it if the array is empty will simplify the response.
Comment on attachment 246675 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=246675&action=review > Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp:200 > + result->putDirect(exec->vm(), Identifier(exec, "name"), jsString(exec, name)); jsNontrivialString and ASCIILiteral for name?
Comment on attachment 246675 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=246675&action=review >> Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp:200 >> + result->putDirect(exec->vm(), Identifier(exec, "name"), jsString(exec, name)); > > jsNontrivialString and ASCIILiteral for name? jsNontrivialString - I debated it, and said no in case we ever have a single character string. (it asserts length > 1, not >= 1). ASCIILiteral - I thought there was a jsString for char* but there isn't. I'll change the param to const String& and use ASCIILiteral above.
http://trac.webkit.org/changeset/180235
(In reply to comment #12) > http://trac.webkit.org/changeset/180235 It broke the !ENABLE(PROMISES) build, see bug141746 for details.