a11b0d962d
Currently we incorrectly show global object as arrow function receiver. With this CL: - if this is used inside of function we show correct this value, - if this is unused and V8 optimizes it out - we show undefined. Second is known issue which we should address separately. R=dgozman@chromium.org,yangguo@chromium.org Bug: chromium:552753 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Change-Id: Iac88a07fe622eb9b2f8af7ecbc4a32a56c8cdfaa Reviewed-on: https://chromium-review.googlesource.com/723840 Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#48839}
108 lines
1.5 KiB
Plaintext
108 lines
1.5 KiB
Plaintext
Checks this in arrow function scope
|
|
(function() {
|
|
let f = () => { #debugger; };
|
|
f();
|
|
|
|
This on callFrame:
|
|
{
|
|
type : undefined
|
|
}
|
|
This in evaluateOnCallFrame:
|
|
{
|
|
type : undefined
|
|
}
|
|
Values equal: true
|
|
|
|
let f = () => { debugger; };
|
|
#f();
|
|
}).call('a');
|
|
|
|
This on callFrame:
|
|
{
|
|
className : String
|
|
description : String
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
This in evaluateOnCallFrame:
|
|
{
|
|
className : String
|
|
description : String
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
Values equal: true
|
|
|
|
f();
|
|
}).#call('a');
|
|
return a;
|
|
|
|
This on callFrame:
|
|
{
|
|
className : Number
|
|
description : Number
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
This in evaluateOnCallFrame:
|
|
{
|
|
className : Number
|
|
description : Number
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
Values equal: true
|
|
|
|
function boo() {
|
|
foo.call(1)#();
|
|
}
|
|
|
|
This on callFrame:
|
|
{
|
|
className : Object
|
|
description : Object
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
This in evaluateOnCallFrame:
|
|
{
|
|
className : Object
|
|
description : Object
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
Values equal: true
|
|
|
|
}
|
|
(() => boo.#call({}))();
|
|
|
|
This on callFrame:
|
|
{
|
|
type : undefined
|
|
}
|
|
This in evaluateOnCallFrame:
|
|
{
|
|
type : undefined
|
|
}
|
|
Values equal: true
|
|
|
|
}
|
|
(() => boo.call({}))#();
|
|
|
|
This on callFrame:
|
|
{
|
|
className : global
|
|
description : global
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
This in evaluateOnCallFrame:
|
|
{
|
|
className : Object
|
|
description : Object
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
Values equal: false
|
|
|