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

Issue 2334733002: [runtime] Intercept function declarations. (Closed)

Created:
4 years, 3 months ago by Franzi
Modified:
4 years, 3 months ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[runtime] Intercept function declarations. We used to intercept function definitions, but not declarations. GenericNamedPropertySetterCallback now also intercepts function declarations. For definitions, we call DeclareGlobal and then InitializeVarGlobal. For declarations, we never call InitializeVarGlobal, thus we must check for interceptors in DeclareGlobal. If the semantics of a redeclaration are wrong, e.g., redeclaring a read-only property, an exception is thrown independent of whether an interceptor is installed. Usually, i.e., not during a declaration, we only throw if the call is not successfully intercepted. BUG=v8:5375 Committed: https://crrev.com/8439401d2dfdb9fa328c758cca689289922a32d1 Cr-Commit-Position: refs/heads/master@{#39450}

Patch Set 1 #

Patch Set 2 : Only restart for function declarations #

Patch Set 3 : Fix decl test #

Patch Set 4 : Fix remaining decl tests. #

Patch Set 5 : Fix block-sloppy-function test. #

Patch Set 6 : Delete unused should_throw variable. #

Patch Set 7 : Add test for function re-declaration. #

Patch Set 8 : Add tests for re-declaration and read only. #

Patch Set 9 : Add more tests #

Patch Set 10 : Simplify test. #

Patch Set 11 : Use cctest isolate. #

Patch Set 12 : Small test refactoring. #

Patch Set 13 : Simplify tests. #

Patch Set 14 : Fix test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -21 lines) Patch
M src/runtime/runtime-scopes.cc View 1 2 3 4 5 6 7 5 chunks +16 lines, -5 lines 0 comments Download
M test/cctest/test-api-interceptors.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +92 lines, -2 lines 0 comments Download
M test/cctest/test-decls.cc View 1 2 3 4 chunks +4 lines, -14 lines 0 comments Download

Messages

Total messages: 70 (55 generated)
Franzi
Hi Jochen, Please take a look. Thanks, Franzi
4 years, 3 months ago (2016-09-13 12:47:19 UTC) #23
adamk
I'm a little worried about the possible performance effects of this. Does this mean that ...
4 years, 3 months ago (2016-09-13 22:22:17 UTC) #27
Franzi
On 2016/09/13 at 22:22:17, adamk wrote: > I'm a little worried about the possible performance ...
4 years, 3 months ago (2016-09-14 02:50:35 UTC) #28
jochen (gone - plz use gerrit)
it's only slow if we had an interceptor on the global object, no?
4 years, 3 months ago (2016-09-14 08:46:27 UTC) #29
jochen (gone - plz use gerrit)
what happens if you redeclare a function?
4 years, 3 months ago (2016-09-14 08:48:32 UTC) #30
Franzi
On 2016/09/14 at 08:48:32, jochen wrote: > what happens if you redeclare a function? I ...
4 years, 3 months ago (2016-09-14 11:40:34 UTC) #33
jochen (gone - plz use gerrit)
On 2016/09/14 at 11:40:34, franzih wrote: > On 2016/09/14 at 08:48:32, jochen wrote: > > ...
4 years, 3 months ago (2016-09-14 14:07:11 UTC) #36
Franzi
On 2016/09/14 at 14:07:11, jochen wrote: > On 2016/09/14 at 11:40:34, franzih wrote: > > ...
4 years, 3 months ago (2016-09-14 14:39:32 UTC) #39
adamk
On 2016/09/14 02:50:35, Franzi wrote: > On 2016/09/13 at 22:22:17, adamk wrote: > > I'm ...
4 years, 3 months ago (2016-09-14 17:19:57 UTC) #51
Franzi
> To Jochen's point, don't we always have an interceptor on the global object when ...
4 years, 3 months ago (2016-09-14 18:25:52 UTC) #56
jochen (gone - plz use gerrit)
On 2016/09/14 at 18:25:52, franzih wrote: > > To Jochen's point, don't we always have ...
4 years, 3 months ago (2016-09-15 10:16:13 UTC) #59
Franzi
On 2016/09/15 at 10:16:13, jochen wrote: > On 2016/09/14 at 18:25:52, franzih wrote: > > ...
4 years, 3 months ago (2016-09-15 14:46:16 UTC) #60
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/2334733002/250001
4 years, 3 months ago (2016-09-15 15:36:04 UTC) #67
commit-bot: I haz the power
Committed patchset #14 (id:250001)
4 years, 3 months ago (2016-09-15 15:47:54 UTC) #68
commit-bot: I haz the power
4 years, 3 months ago (2016-09-15 15:48:48 UTC) #70
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/8439401d2dfdb9fa328c758cca689289922a32d1
Cr-Commit-Position: refs/heads/master@{#39450}

Powered by Google App Engine
This is Rietveld 408576698