I hope I have not been too unconcise in my description of the issue.
Just wanted to figure if the underlying API calls suffice any use cases of
getting the typename:
In the Factory::NewStackFrameInfo-ctor I use the already in-place function
"it.Frame()->GetTypeName()" in order to retrieve the typename.
Initial testing with the updated v8 and a custom built Node had shown this
change did work fine (did not test changing the "this" though).
Unit testing has revealed that if I use "call" on a function object and set
another "this" no typename is delivered at all (in contrast to using the
Callsites-API).
Is "it.Frame()->GetTypeName()" supposed to deliver the typename also in the
use-case of changing the "this"? If the answer is yes it looks like a bug
and I am more than willing to track it down.
If the answer is no it looks like I am missing something in my code. Any
pointers welcome.
It just does not feel right as "it.Frame()->GetTypeName()" delivers the
correct typename if I keep the "this" unchanged.
Thanks,
Dominik
On Wednesday, May 22, 2019 at 4:40:21 PM UTC+2, Dominik Gruber wrote:
>
> I did add a test and stumbled upon the following issue:
>
> // following test code to test the GetTypeName feature:
> function bar() {
> };
>
> bar.prototype.x = function foo() {
> AnalyzeStackInNativeCode();
> }
> var baz = new bar();
> baz.x(); // returned typename = "bar" as expected
> baz.x.call("aString"); // typename is "" but I had expected it to be
> "String"
>
> I tracked the missing code for getting the typename down to "factory.cc"
> and the "NewStackFrameInfo"-ctor where I reused the already exisiting
> "GetTypeName" function from the FrameArrayIterator. The same API call is
> also used in CallSitePrototypeGetTypeName so I assumed that would work here
> as well. Was my assumption false? Or is that test code not meant to run in
> this test context?
>
> Any help pushing me in the right direction is highly appreciated.
>
> Thanks,
> Dominik
>
> On Wednesday, May 22, 2019 at 10:40:22 AM UTC+2, Dominik Gruber wrote:
>>
>> Indeed, good catch. Did a rebuild and tests run now. Thanks!
>>
>> On Wednesday, May 22, 2019 at 10:34:00 AM UTC+2, Jakob Gruber wrote:
>>>
>>> Shot in the dark: are you building with `v8_static_library = true`?
>>> cctests unfortunately don't work in that config
>>> <https://bugs.chromium.org/p/chromium/issues/detail?id=957029#c8>.
>>>
>>> On Wed, May 22, 2019 at 10:22 AM Dominik Gruber <[email protected]>
>>> wrote:
>>>
>>>> Hi Simon,
>>>>
>>>> can you give me an example on how to run a test procedure from
>>>> "test-api-stack-traces.cc"? Running "tools/run-tests.py
>>>> --outdir=out/x64.release cctest" does not result in any test runs. I guess
>>>> I have to define a target, but I am struggling to find the correct
>>>> parameters.
>>>>
>>>> Thanks,
>>>> Dominik
>>>>
>>>> On Monday, May 20, 2019 at 1:40:40 PM UTC+2, Simon Zünd wrote:
>>>>>
>>>>> Unfortunately we don't accept patches from Github PRs and we don't
>>>>> review code on Github. Please follow the instructions at
>>>>> https://chromium.googlesource.com/chromium/src/+/master/docs/contributing.md#Uploading-a-change-for-review.
>>>>>
>>>>> This way, the CL can run against our Try bots and the CL can properly be
>>>>> reviewed in Gerrit.
>>>>>
>>>>> On Mon, May 20, 2019 at 1:25 PM Dominik Gruber <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi Simon,
>>>>>>
>>>>>> Dynatrace has already signed the CLA.
>>>>>> I am currently porting the changeset to our v8 fork. Is it sufficient
>>>>>> if I provide the link to the git repo with the changelist for reviewing?
>>>>>>
>>>>>> Thanks,
>>>>>> Dominik
>>>>>>
>>>>>>
>>>>>> On Thursday, May 16, 2019 at 2:10:09 PM UTC+2, Simon Zünd wrote:
>>>>>>>
>>>>>>> Hi Dominik,
>>>>>>>
>>>>>>> for general V8 contribution guidelines, please follow
>>>>>>> https://v8.dev/docs/contribute. There is also currently some work
>>>>>>> going regarding stack traces. Feel free to use the same tracking bug (
>>>>>>> https://crbug.com/v8/8742) for your CLs. You can send your CLs to
>>>>>>> me for review and I will add additional reviewers as necessary.
>>>>>>>
>>>>>>> AFAIK Node 12 will stay at V8 API compatibility of 7.5 (the current
>>>>>>> V8 version being worked on is 7.6). Meaning your change won't make it
>>>>>>> into
>>>>>>> Node 12. Note that the contribution process for Node itself differs
>>>>>>> from V8.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Simon
>>>>>>>
>>>>>>> *From: *Jakob Gruber <[email protected]>
>>>>>>> *Date: *Thu, May 16, 2019 at 2:01 PM
>>>>>>> *To: * <[email protected]>, Simon Zünd, Yang Guo
>>>>>>>
>>>>>>> +Simon Zünd +Yang Guo
>>>>>>>>
>>>>>>>> *From: *Dominik Gruber <[email protected]>
>>>>>>>> *Date: *Thu, May 16, 2019 at 1:58 PM
>>>>>>>> *To: *v8-dev
>>>>>>>>
>>>>>>>> Dear v8 community,
>>>>>>>>>
>>>>>>>>> Background: The native API is lacking the functionality
>>>>>>>>> "GetTypeName" on StackFrame objects contrary to Callsites where this
>>>>>>>>> feature is available to the managed API.
>>>>>>>>>
>>>>>>>>> We have implemented and tested this feature with Nodejs and would
>>>>>>>>> like to contribute those changes to the v8 source and get that
>>>>>>>>> feature into
>>>>>>>>> Nodejs as soon as possible.
>>>>>>>>>
>>>>>>>>> Can someone guide me through the contribution process regarding
>>>>>>>>> issue creation, code review, merge to Nodejs?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Dominik
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> --
>>>>>>>>> v8-dev mailing list
>>>>>>>>> [email protected]
>>>>>>>>> http://groups.google.com/group/v8-dev
>>>>>>>>> ---
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>> Groups "v8-dev" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send an email to [email protected].
>>>>>>>>> To view this discussion on the web visit
>>>>>>>>> https://groups.google.com/d/msgid/v8-dev/7b6bdc89-ec2f-4594-8c4f-7b7af4b426d2%40googlegroups.com
>>>>>>>>>
>>>>>>>>> <https://groups.google.com/d/msgid/v8-dev/7b6bdc89-ec2f-4594-8c4f-7b7af4b426d2%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>> .
>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>
>>>>>>>> --
>>>>>> --
>>>>>> v8-dev mailing list
>>>>>> [email protected]
>>>>>> http://groups.google.com/group/v8-dev
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "v8-dev" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to [email protected].
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/d/msgid/v8-dev/2eecbe69-7b7d-42f5-8437-f4fe7a2b1158%40googlegroups.com
>>>>>>
>>>>>> <https://groups.google.com/d/msgid/v8-dev/2eecbe69-7b7d-42f5-8437-f4fe7a2b1158%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>> --
>>>> --
>>>> v8-dev mailing list
>>>> [email protected]
>>>> http://groups.google.com/group/v8-dev
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "v8-dev" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/v8-dev/363c0022-4d1d-4aee-ae36-6a7589b7fb1e%40googlegroups.com
>>>>
>>>> <https://groups.google.com/d/msgid/v8-dev/363c0022-4d1d-4aee-ae36-6a7589b7fb1e%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/v8-dev/1bf1b206-45d6-4bf2-82ed-ae64b988acc6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.