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

Issue 289423002: DevTools: added injectedScript.evaluateWithDetails, that return exception details if it occured (Closed)

Created:
6 years, 7 months ago by kozyatinskiy1
Modified:
6 years, 5 months ago
Reviewers:
vsevik, aandrey, pfeldman, yurys
CC:
blink-reviews, caseq+blink_chromium.org, loislo+blink_chromium.org, eustas+blink_chromium.org, malch+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, paulirish+reviews_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, sergeyv+blink_chromium.org, aandrey+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Added V8InjectedScriptHost::evaluateWithDetails. This method returns {result: evaluation result, exceptionDetails: information about the exception, if it occurred}. InjectedScriptSource.evaluate and InjectedScriptSource.callFunctionOn uses it. There functions returns additional field with exceptionDetails, if exception occurred. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178051 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178164

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Patch Set 3 : #

Total comments: 6

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Total comments: 4

Patch Set 6 : #

Total comments: 4

Patch Set 7 : #

Total comments: 2

Patch Set 8 : #

Patch Set 9 : #

Total comments: 5

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -35 lines) Patch
M Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +31 lines, -1 line 0 comments Download
M Source/bindings/core/v8/custom/V8JavaScriptCallFrameCustom.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/inspector/InjectedScriptCanvasModuleSource.js View 1 2 3 4 5 6 7 8 9 10 4 chunks +4 lines, -4 lines 0 comments Download
M Source/core/inspector/InjectedScriptExterns.js View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +9 lines, -2 lines 0 comments Download
M Source/core/inspector/InjectedScriptHost.idl View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/inspector/InjectedScriptSource.js View 1 2 3 4 5 6 7 8 9 10 11 chunks +22 lines, -21 lines 0 comments Download
M Source/core/inspector/JavaScriptCallFrame.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -1 line 0 comments Download
M Source/core/inspector/JavaScriptCallFrame.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +27 lines, -2 lines 0 comments Download
M Source/core/inspector/JavaScriptCallFrame.idl View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 35 (0 generated)
kozyatinskiy1
6 years, 7 months ago (2014-05-19 16:49:35 UTC) #1
vsevik
We should return the resulting exception through protocol, not through general Devtools exception handler.
6 years, 7 months ago (2014-05-20 08:23:01 UTC) #2
vsevik
https://chromiumcodereview.appspot.com/289423002/diff/1/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp File Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp (left): https://chromiumcodereview.appspot.com/289423002/diff/1/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp#oldcode339 Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp:339: v8SetReturnValue(info, tryCatch.ReThrow()); Let's move on with SetVerbose instead.
6 years, 7 months ago (2014-05-20 08:23:09 UTC) #3
kozyatinskiy1
6 years, 7 months ago (2014-05-26 12:13:35 UTC) #4
kozyatinskiy1
On 2014/05/26 12:13:35, kozyatinskiy wrote: All dependency have already committed. Please, review.
6 years, 6 months ago (2014-06-11 16:34:41 UTC) #5
vsevik
Let's split this into 2 patches: 1) Moving try/catch blocks around 2) Plumbing exceptionDetails
6 years, 5 months ago (2014-06-27 12:23:57 UTC) #6
kozyatinskiy1
On 2014/06/27 12:23:57, vsevik wrote: > 1) Moving try/catch blocks around Done. Moved completely.
6 years, 5 months ago (2014-07-03 16:00:59 UTC) #7
vsevik
https://chromiumcodereview.appspot.com/289423002/diff/130001/Source/core/inspector/InjectedScriptSource.js File Source/core/inspector/InjectedScriptSource.js (right): https://chromiumcodereview.appspot.com/289423002/diff/130001/Source/core/inspector/InjectedScriptSource.js#newcode613 Source/core/inspector/InjectedScriptSource.js:613: if (func.exceptionDetails) Everything except func.apply could me moved out ...
6 years, 5 months ago (2014-07-04 06:54:59 UTC) #8
kozyatinskiy1
On 2014/07/04 06:54:59, vsevik wrote: > https://chromiumcodereview.appspot.com/289423002/diff/130001/Source/core/inspector/InjectedScriptSource.js > File Source/core/inspector/InjectedScriptSource.js (right): > > https://chromiumcodereview.appspot.com/289423002/diff/130001/Source/core/inspector/InjectedScriptSource.js#newcode613 > ...
6 years, 5 months ago (2014-07-04 14:10:26 UTC) #9
vsevik
This looks good to me now. Pavel, Yury, could you please take a look? https://codereview.chromium.org/289423002/diff/190001/Source/bindings/core/v8/EvaluateExceptionDetailsFactory.cpp ...
6 years, 5 months ago (2014-07-04 14:59:30 UTC) #10
kozyatinskiy1
> https://codereview.chromium.org/289423002/diff/190001/Source/bindings/core/v8/EvaluateExceptionDetailsFactory.cpp > File Source/bindings/core/v8/EvaluateExceptionDetailsFactory.cpp (right): > > https://codereview.chromium.org/289423002/diff/190001/Source/bindings/core/v8/EvaluateExceptionDetailsFactory.cpp#newcode7 > Source/bindings/core/v8/EvaluateExceptionDetailsFactory.cpp:7: * > ditto > ...
6 years, 5 months ago (2014-07-04 15:24:43 UTC) #11
aandrey
https://codereview.chromium.org/289423002/diff/280001/Source/core/inspector/InjectedScriptSource.js File Source/core/inspector/InjectedScriptSource.js (right): https://codereview.chromium.org/289423002/diff/280001/Source/core/inspector/InjectedScriptSource.js#newcode668 Source/core/inspector/InjectedScriptSource.js:668: if (!wrappedResult.exceptionDetails) wrappedResult can be undefined here https://codereview.chromium.org/289423002/diff/280001/Source/core/inspector/InjectedScriptSource.js#newcode669 Source/core/inspector/InjectedScriptSource.js:669: ...
6 years, 5 months ago (2014-07-04 17:15:07 UTC) #12
aandrey
BTW, how come this patch was not CC-ed to blink-reviews@ ?
6 years, 5 months ago (2014-07-04 17:17:20 UTC) #13
kozyatinskiy1
On 2014/07/04 17:15:07, aandrey wrote: > https://codereview.chromium.org/289423002/diff/280001/Source/core/inspector/InjectedScriptSource.js > File Source/core/inspector/InjectedScriptSource.js (right): > > https://codereview.chromium.org/289423002/diff/280001/Source/core/inspector/InjectedScriptSource.js#newcode668 > ...
6 years, 5 months ago (2014-07-04 17:53:52 UTC) #14
aandrey
https://codereview.chromium.org/289423002/diff/320001/Source/core/inspector/InjectedScriptSource.js File Source/core/inspector/InjectedScriptSource.js (right): https://codereview.chromium.org/289423002/diff/320001/Source/core/inspector/InjectedScriptSource.js#newcode668 Source/core/inspector/InjectedScriptSource.js:668: if (!wrappedResult || !wrappedResult.exceptionDetails) { wrong condition. you should ...
6 years, 5 months ago (2014-07-04 19:01:22 UTC) #15
kozyatinskiy1
https://codereview.chromium.org/289423002/diff/320001/Source/core/inspector/InjectedScriptSource.js File Source/core/inspector/InjectedScriptSource.js (right): https://codereview.chromium.org/289423002/diff/320001/Source/core/inspector/InjectedScriptSource.js#newcode668 Source/core/inspector/InjectedScriptSource.js:668: if (!wrappedResult || !wrappedResult.exceptionDetails) { On 2014/07/04 19:01:22, aandrey ...
6 years, 5 months ago (2014-07-05 10:52:46 UTC) #16
aandrey
https://codereview.chromium.org/289423002/diff/360001/Source/core/inspector/InjectedScriptSource.js File Source/core/inspector/InjectedScriptSource.js (right): https://codereview.chromium.org/289423002/diff/360001/Source/core/inspector/InjectedScriptSource.js#newcode668 Source/core/inspector/InjectedScriptSource.js:668: if (wrappedResult != undefined || !wrappedResult.exceptionDetails) { in fact, ...
6 years, 5 months ago (2014-07-05 11:15:12 UTC) #17
kozyatinskiy1
https://codereview.chromium.org/289423002/diff/360001/Source/core/inspector/InjectedScriptSource.js File Source/core/inspector/InjectedScriptSource.js (right): https://codereview.chromium.org/289423002/diff/360001/Source/core/inspector/InjectedScriptSource.js#newcode668 Source/core/inspector/InjectedScriptSource.js:668: if (wrappedResult != undefined || !wrappedResult.exceptionDetails) { On 2014/07/05 ...
6 years, 5 months ago (2014-07-05 11:24:32 UTC) #18
aandrey
lgtm please wait for vsevik
6 years, 5 months ago (2014-07-05 11:30:33 UTC) #19
kozyatinskiy1
https://codereview.chromium.org/289423002/diff/410001/Source/core/inspector/InjectedScriptCanvasModuleSource.js File Source/core/inspector/InjectedScriptCanvasModuleSource.js (right): https://codereview.chromium.org/289423002/diff/410001/Source/core/inspector/InjectedScriptCanvasModuleSource.js#newcode4584 Source/core/inspector/InjectedScriptCanvasModuleSource.js:4584: var wrappedResult = InjectedScriptHost.evaluate("(" + stringId + ")"); Fixed: ...
6 years, 5 months ago (2014-07-05 13:34:14 UTC) #20
pfeldman
I would not want to land it as is: it converts InjectedScriptHost.evaluate from simple eval ...
6 years, 5 months ago (2014-07-05 20:11:06 UTC) #21
kozyatinskiy1
Logic was moved to InjectedScriptHost.evaluateWithDetails. InjectedScriptHost.evaluate was restored. @vsevik, @aandrey, @pfeldman please take a look.
6 years, 5 months ago (2014-07-07 12:20:47 UTC) #22
kozyatinskiy1
@vsevik, @aandrey, @pfeldman: friendly ping!
6 years, 5 months ago (2014-07-11 19:50:49 UTC) #23
kozyatinskiy1
Renamed InjectedScriptHost.evaluate to InjectedScriptHost.eval. Renamed InjectedScriptHost.evaluateWithDetails, JavaScriptCallFrame.evaluate to InjectedScriptHost.evaluateWithExceptionDetails and JavaScriptCallFrame.evaluateWithExceptionDetails. @vsevik, @aandrey, @pfeldman, please ...
6 years, 5 months ago (2014-07-14 11:51:00 UTC) #24
vsevik
lgtm
6 years, 5 months ago (2014-07-14 11:52:21 UTC) #25
pfeldman
owners lgtm
6 years, 5 months ago (2014-07-14 11:57:26 UTC) #26
vsevik
The CQ bit was checked by vsevik@chromium.org
6 years, 5 months ago (2014-07-14 11:58:35 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kozyatinskiy@google.com/289423002/450001
6 years, 5 months ago (2014-07-14 11:59:03 UTC) #28
commit-bot: I haz the power
Change committed as 178051
6 years, 5 months ago (2014-07-14 12:54:12 UTC) #29
Justin Novosad
A revert of this CL has been created in https://codereview.chromium.org/389363002/ by junov@chromium.org. The reason for ...
6 years, 5 months ago (2014-07-14 16:15:05 UTC) #30
Justin Novosad
The revert successfully resolved the problems with telemetry unit test.
6 years, 5 months ago (2014-07-14 19:07:15 UTC) #31
kozyatinskiy1
On 2014/07/14 19:07:15, junov wrote: > The revert successfully resolved the problems with telemetry unit ...
6 years, 5 months ago (2014-07-14 19:19:12 UTC) #32
vsevik
The CQ bit was checked by vsevik@chromium.org
6 years, 5 months ago (2014-07-15 10:58:20 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kozyatinskiy@google.com/289423002/470001
6 years, 5 months ago (2014-07-15 10:59:11 UTC) #34
commit-bot: I haz the power
6 years, 5 months ago (2014-07-15 12:14:22 UTC) #35
Message was sent while issue was closed.
Change committed as 178164

Powered by Google App Engine
This is Rietveld 408576698