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

Issue 2090333002: Use instance type in Object::IsErrorObject(). (Closed)

Created:
4 years, 6 months ago by Franzi
Modified:
4 years, 4 months ago
CC:
jochen (gone - plz use gerrit), esprehn, v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@RefactorToString
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Use JS_ERROR_TYPE to check for error objects. Replace explicit Object::IsErrorObject() and v8::IsNativeError() with macro generated functions Object::IsJSError() and HeapObject::IsJSError(). BUG= Committed: https://crrev.com/90e4fd136387ca7271d8ea87f4fc667e4f55063b Cr-Commit-Position: refs/heads/master@{#37244} CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel Committed: https://crrev.com/a2dad04f9c0931f8c120cc6457de862866297897 Cr-Commit-Position: refs/heads/master@{#37279}

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 2

Patch Set 3 : Simplify IsNativeError() #

Patch Set 4 : Rebase + rename variable #

Total comments: 2

Patch Set 5 : Refactor IsErrorObject() #

Total comments: 1

Patch Set 6 : IsErrorObject() does not need to be static #

Patch Set 7 : Do not use auto in short definition #

Patch Set 8 : Move IsErrorObject() to the other Is...() definitions #

Patch Set 9 : Use TYPE_CHECKER for HeapObject::IsJSError() #

Patch Set 10 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -163 lines) Patch
M src/api.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -16 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M src/messages.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 2 chunks +116 lines, -118 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -12 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -3 lines 0 comments Download
M test/cctest/wasm/test-wasm-stack.cc View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -6 lines 0 comments Download
M test/cctest/wasm/test-wasm-trap-position.cc View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -6 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 32 (15 generated)
Franzi
Hi Toon, I changed Object::IsErrorObject() to simply check the instance type. Cheers, Franzi
4 years, 6 months ago (2016-06-23 12:01:25 UTC) #2
Toon Verwaest
That was quick! lgtm. (api.cc remaining though) https://codereview.chromium.org/2090333002/diff/20001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2090333002/diff/20001/src/objects.cc#newcode1294 src/objects.cc:1294: Handle<JSReceiver> receiver ...
4 years, 6 months ago (2016-06-23 12:04:39 UTC) #3
Franzi
Simplified IsNativeError() as well. PTAL. Thanks, Franzi https://codereview.chromium.org/2090333002/diff/20001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2090333002/diff/20001/src/objects.cc#newcode1294 src/objects.cc:1294: Handle<JSReceiver> receiver ...
4 years, 6 months ago (2016-06-23 14:10:19 UTC) #5
Toon Verwaest
https://codereview.chromium.org/2090333002/diff/60001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2090333002/diff/60001/src/objects.cc#newcode1292 src/objects.cc:1292: bool Object::IsErrorObject(Isolate* isolate, Handle<Object> object) { This doesn't need ...
4 years, 6 months ago (2016-06-23 14:22:40 UTC) #6
Toon Verwaest
4 years, 6 months ago (2016-06-23 14:35:12 UTC) #7
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2090333002/diff/60001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/2090333002/diff/60001/src/api.cc#newcode3011 src/api.cc:3011: return js_obj->map()->instance_type() == i::JS_ERROR_TYPE; why not just auto self ...
4 years, 6 months ago (2016-06-23 14:42:15 UTC) #9
Toon Verwaest
lgtm with a last comment https://codereview.chromium.org/2090333002/diff/80001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2090333002/diff/80001/src/objects.cc#newcode1292 src/objects.cc:1292: bool Object::IsErrorObject(Handle<Object> object) { ...
4 years, 6 months ago (2016-06-23 17:09:30 UTC) #10
Franzi
PTAL. Thanks, Franzi
4 years, 6 months ago (2016-06-24 08:39:40 UTC) #11
Franzi
Us macro-generated IsJSError() and TYPE_CHECKER() instead of explicit definition
4 years, 6 months ago (2016-06-24 09:27:45 UTC) #12
Toon Verwaest
lgtm
4 years, 6 months ago (2016-06-24 09:30:47 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2090333002/160001
4 years, 6 months ago (2016-06-24 09:37:08 UTC) #16
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 6 months ago (2016-06-24 09:52:54 UTC) #18
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/90e4fd136387ca7271d8ea87f4fc667e4f55063b Cr-Commit-Position: refs/heads/master@{#37244}
4 years, 6 months ago (2016-06-24 09:53:25 UTC) #20
Michael Achenbach
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/2092083002/ by machenbach@chromium.org. ...
4 years, 6 months ago (2016-06-24 11:52:08 UTC) #21
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/2090333002/180001
4 years, 5 months ago (2016-06-27 08:08:18 UTC) #27
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 5 months ago (2016-06-27 09:32:07 UTC) #29
commit-bot: I haz the power
4 years, 5 months ago (2016-06-27 09:34:51 UTC) #31
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/a2dad04f9c0931f8c120cc6457de862866297897
Cr-Commit-Position: refs/heads/master@{#37279}

Powered by Google App Engine
This is Rietveld 408576698