On Tue, May 28, 2019 at 11:20 AM Luo Wu <lwye...@pku.edu.cn> wrote:
>
> Thanks for your reply.
>
> I checked the code related to IsolateAddressId::kContextAddress. In 
> src/builtins/x64/builtins-x64.cc, it seems that the function 
> Generate_JSEntryTrampolineHelper just loads the context but does not 
> overwrites it. I also found that the context is overwrote in 
> MacroAssembler::EnterExitFramePrologue. Is it the one I need to instrument? 
> Or is there any misunderstanding on my part?
>
> If i am right, are all JS function calls (including document.cookie etc) 
> going through that function, or are they just cross-frame function calls?
>
> Thank you.

MacroAssembler::EnterExitFramePrologue() is one place but there's also
the microtask queue (used for things like promises), see
SetCurrentContext() in src/builtins/builtins-microtask-queue-gen.cc.
That file generates machine code ahead-of-time.

NB: You may not need to instrument the AOT code (which is even
trickier than instrumenting runtime generated code) because ultimately
it calls Builtins::Generate_CallFunction() and that function also
loads the context from JSFunction::kContextOffset.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/CAHQurc9MfWyYPWb-wCBS5GO5Mst_g_Dv8%3DiSyR2AYXsu6ZYJHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to