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

Issue 2693203003: Make CreationContext() not crash when there is no creation context. (Closed)

Created:
3 years, 10 months ago by dcheng
Modified:
3 years, 10 months ago
CC:
Devlin, v8-reviews_googlegroups.com, Toon Verwaest
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Make CreationContext() not crash when there is no creation context. Remote objects don't have a creation context. BUG=527190 Review-Url: https://codereview.chromium.org/2693203003 Cr-Commit-Position: refs/heads/master@{#43306} Committed: https://chromium.googlesource.com/v8/v8/+/40b74d04daabe599a6c2f1ea5b2d1eb9cce4ae8c

Patch Set 1 #

Patch Set 2 : has_context instead of nullptr #

Total comments: 1

Patch Set 3 : Tests and formatting #

Patch Set 4 : GYPPPPPP #

Patch Set 5 : Remove unnecessary v8 nested name specifier #

Patch Set 6 : Rebase on top of other patch instead. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -9 lines) Patch
M src/api.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M src/objects.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M src/objects.cc View 1 2 3 chunks +5 lines, -4 lines 0 comments Download
M src/objects-inl.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M test/unittests/api/remote-object-unittest.cc View 1 2 3 4 5 1 chunk +23 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 36 (26 generated)
dcheng
Disclaimer: I don't really know what I'm doing, so this patch could be horribly wrong ...
3 years, 10 months ago (2017-02-15 10:41:55 UTC) #5
jochen (gone - plz use gerrit)
I think it's preferable to add JSFunction::has_context() instead of making context() return a nullptr also, ...
3 years, 10 months ago (2017-02-15 10:44:44 UTC) #6
dcheng
(I'll finish the test up tomorrow morning, I'm sleepy =) https://codereview.chromium.org/2693203003/diff/20001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2693203003/diff/20001/src/objects.cc#newcode3181 ...
3 years, 10 months ago (2017-02-15 11:23:13 UTC) #9
dcheng
PTAL, test added.
3 years, 10 months ago (2017-02-16 07:33:01 UTC) #22
jochen (gone - plz use gerrit)
Adding Toon who mentioned an alternative idea (returning a dummy creation context of sorts)
3 years, 10 months ago (2017-02-16 12:37:02 UTC) #28
Toon Verwaest
What about just exposing a "IsRemoteGlobal()" and using that explicitly? That's basically just taking jochen's ...
3 years, 10 months ago (2017-02-17 09:30:27 UTC) #29
dcheng
On 2017/02/17 09:30:27, Toon Verwaest wrote: > What about just exposing a "IsRemoteGlobal()" and using ...
3 years, 10 months ago (2017-02-17 09:55:43 UTC) #30
Toon Verwaest
ok sounds reasonable. lgtm then
3 years, 10 months ago (2017-02-20 08:34:26 UTC) #31
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/2693203003/100001
3 years, 10 months ago (2017-02-20 09:20:43 UTC) #33
commit-bot: I haz the power
3 years, 10 months ago (2017-02-20 09:47:21 UTC) #36
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/v8/v8/+/40b74d04daabe599a6c2f1ea5b2d1eb9cce...

Powered by Google App Engine
This is Rietveld 408576698