--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To post to this group, send email to platform-arc...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WwjW4pH6XR-%2Bvzg%2Bp4CVMcv3SRK_NMVovwspUks443bhw%40mail.gmail.com.
2) Adjust the V8 API so that a context doesn't get entered automatically. Either
a) not at all (forcing all clients to use v8::Context::Enter()), or
b) not for some operations (ToString()/Get()/Set()), or
c) not unless there's no currently entered context, or
d) make it optional for all/most operations.
I'm thinking 2(a) would be at least an inconvenient approach for many
embedders, including Blink. 2(b) feels rather arbitrary. 2(c) would
seem fine by me, but I don't really know what the consequences would
be. (And Blink would probably need to explicitly enter contexts in
some cases then.)
--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsubsc...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WyWoEsx4AgZrGUM-oaGZepnkY60iOsuy%3D2EF0A-AsmV9w%40mail.gmail.com.
V8 could easily switch to not marking the context used in API functions as entered. We'd probably have to audit for internal uses of Context::Scope but I believe that's not a lot either.
How would you ensure that blink correctly enters entry contexts?
I guess we should also consider requiring an access check when invoking an api function with a context that's different from the entered context.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To post to this group, send email to platform-arc...@chromium.org.
V8 could easily switch to not marking the context used in API functions as entered. We'd probably have to audit for internal uses of Context::Scope but I believe that's not a lot either.
How would you ensure that blink correctly enters entry contexts?
I guess we should also consider requiring an access check when invoking an api function with a context that's different from the entered context.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsub...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WyWoEsx4AgZrGUM-oaGZepnkY60iOsuy%3D2EF0A-AsmV9w%40mail.gmail.com.
--Kentaro Hara, Tokyo, Japan
--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CALjhuif6nQjhabi5r3AL6v-i%2B17N3e-JEdFKWu%2Bf-OzJ0b-XaA%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsub...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsubsc...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WyWoEsx4AgZrGUM-oaGZepnkY60iOsuy%3D2EF0A-AsmV9w%40mail.gmail.com.
--Kentaro Hara, Tokyo, Japan
--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsubsc...@chromium.org.
By the way, the Incumbent realm has the same problem as the Entry realm has, so this will help Blink implement the Incumbent realm, too.2017-03-22 16:49 GMT+09:00 Yuki Shiino <yukis...@chromium.org>:2017-03-22 16:33 GMT+09:00 Jochen Eisinger <joc...@chromium.org>:V8 could easily switch to not marking the context used in API functions as entered. We'd probably have to audit for internal uses of Context::Scope but I believe that's not a lot either.
How would you ensure that blink correctly enters entry contexts?
For non-nested cases, could V8 check if the current context is empty or not? If it's empty, Blink must forget to enters an context.
For nested cases, I don't have a good idea at the moment.For promise's cases, the entry realm should be a creation context of (user-defined) fulfill or reject functions, and currently there seems no way for Blink to specify that realm. IIUC, Blink calls
v8::Promise::Resolver::{Resolve,Reject} and v8::Promise::Resolver::{Resolve,Reject} invokes (user-defined) fulfill or reject function respectively. However, Blink has no access to a fulfill or reject function, so there seems no way to specify the entry realm.I guess we should also consider requiring an access check when invoking an api function with a context that's different from the entered context.
Do you mean that the first v8::Context argument must always be the current context?
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To post to this group, send email to platform-arc...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WyWoEsx4AgZrGUM-oaGZepnkY60iOsuy%3D2EF0A-AsmV9w%40mail.gmail.com.
--Kentaro Hara, Tokyo, Japan
--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To post to this group, send email to platform-arc...@chromium.org.
>>>> email to platform-architecture-dev+unsub...@chromium.org.
>>>> To post to this group, send email to
>>>>
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WyWoEsx4AgZrGUM-oaGZepnkY60iOsuy%3D2EF0A-AsmV9w%40mail.gmail.com.
>>>
>>>
>>>
>>>
>>> --
>>> Kentaro Hara, Tokyo, Japan
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "platform-architecture-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to platform-architecture-dev+unsub...@chromium.org.
>> To post to this group, send email to platform-architecture-dev@chromium.org.
>> To view this discussion on the web visit
>> https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CALjhuif6nQjhabi5r3AL6v-i%2B17N3e-JEdFKWu%2Bf-OzJ0b-XaA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WyXL91tYi5fUGHk4jOCEuSjxDwWL1hdrJhVHuoMRpj0eQ%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsub...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.
1) Modify v8's API to only set a context as current, and not entering
it automatically (https://codereview.chromium.org/2782613003), and
2) enter a context in V8ScriptRunner in Blink, where that wasn't
clearly already done.
With these changes, GetEnteredOrMicrotaskContext(), as it's used
today, produces the correct result.
WDYT?
The involved code in Blink might do well with some restructuring as
part of this; it currently enters contexts in varying and sometimes
unclear ways (e.g. using ScriptState::Scope, or ScopedFrameBlamer),
and then calls V8 with isolate->GetCurrentContext() even though that
ought to be a context that was just entered.
>> >>>> email to platform-architecture-dev+unsub...@chromium.org.
>> >>>> To post to this group, send email to
>> >>>>
>> >>>> To view this discussion on the web visit
>> >>>>
>> >>>> https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WyWoEsx4AgZrGUM-oaGZepnkY60iOsuy%3D2EF0A-AsmV9w%40mail.gmail.com.
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Kentaro Hara, Tokyo, Japan
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "platform-architecture-dev" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> >> an
>> >> email to platform-architecture-dev+unsub...@chromium.org.
>> >> To post to this group, send email to
>> >> To view this discussion on the web visit
>> >>
>> >> https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CALjhuif6nQjhabi5r3AL6v-i%2B17N3e-JEdFKWu%2Bf-OzJ0b-XaA%40mail.gmail.com.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "platform-architecture-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to platform-architecture-dev+unsub...@chromium.org.
>> To post to this group, send email to
>> To view this discussion on the web visit
>> https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WyXL91tYi5fUGHk4jOCEuSjxDwWL1hdrJhVHuoMRpj0eQ%40mail.gmail.com.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "platform-architecture-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to platform-architecture-dev+unsub...@chromium.org.
> To post to this group, send email to platform-architecture-dev@chromium.org.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAN0uC_Qpk7Hftx938MFR99BJoWFuYUuZGQCm7xJFpSQexthmDg%40mail.gmail.com.
So, to clarify: I did not actually find (or look for) any instance
where a context obviously wasn't entered already. The situation I was
confronted with was
<unknown> -> V8ScriptRunner -> V8
and I removed context entering from V8, so I assumed adding one to
V8ScriptRunner instead was potentially necessary. And if it wasn't
necessary, it would not hurt to add it, since the addition simply
represented moving it one step down in the callstack.
>> >> >>>> email to platform-architecture-dev+unsub...@chromium.org.
>> >> >>>> To post to this group, send email to
>> >> >>>> platform-architecture-dev@chromium.org.
>> >> >>>>
>> >> >>>> To view this discussion on the web visit
>> >> >>>>
>> >> >>>>
>> >> >>>> https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WyWoEsx4AgZrGUM-oaGZepnkY60iOsuy%3D2EF0A-AsmV9w%40mail.gmail.com.
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> --
>> >> >>> Kentaro Hara, Tokyo, Japan
>> >> >>
>> >> >> --
>> >> >> You received this message because you are subscribed to the Google
>> >> >> Groups
>> >> >> "platform-architecture-dev" group.
>> >> >> To unsubscribe from this group and stop receiving emails from it,
>> >> >> send
>> >> >> an
>> >> >> email to platform-architecture-dev+unsub...@chromium.org.
>> >> >> To post to this group, send email to
>> >> >> platform-architecture-dev@chromium.org.
>> >> >> To view this discussion on the web visit
>> >> >>
>> >> >>
>> >> >> https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CALjhuif6nQjhabi5r3AL6v-i%2B17N3e-JEdFKWu%2Bf-OzJ0b-XaA%40mail.gmail.com.
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "platform-architecture-dev" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> >> an
>> >> email to platform-architecture-dev+unsub...@chromium.org.
>> >> To post to this group, send email to
>> >> To view this discussion on the web visit
>> >>
>> >> https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WyXL91tYi5fUGHk4jOCEuSjxDwWL1hdrJhVHuoMRpj0eQ%40mail.gmail.com.
>> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "platform-architecture-dev" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to platform-architecture-dev+unsub...@chromium.org.
>> > To post to this group, send email to
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAN0uC_Qpk7Hftx938MFR99BJoWFuYUuZGQCm7xJFpSQexthmDg%40mail.gmail.com.
>
>
>
>
> --
> Kentaro Hara, Tokyo, Japan
>
> --
> You received this message because you are subscribed to the Google Groups
> "platform-architecture-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to platform-architecture-dev+unsub...@chromium.org.
> To post to this group, send email to platform-architecture-dev@chromium.org.
> To view this discussion on the web visit
--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsub...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WwYc5SvsHL0DeG6NV0DzEVtND6ccMtVZ_DjhQDRfRK6aA%40mail.gmail.com.
--
Jens
--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To post to this group, send email to platform-arc...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WxB0uDkQMt32Yzf5L9uezLhvekOPXnqoBoBMkAOqhKu1g%40mail.gmail.com.
Daniel
--
Jens
--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsubsc...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAEef6WxB0uDkQMt32Yzf5L9uezLhvekOPXnqoBoBMkAOqhKu1g%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsub...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CABg10jyUikKQ1-3vMJouMzpx1qLdNtYnqB%2BBhJ%3DmkaDeRM3ELg%40mail.gmail.com.