From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from resqmta-ch2-06v.sys.comcast.net (resqmta-ch2-06v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:38]) by hurricane.the-brannons.com (Postfix) with ESMTPS id EEAF278974 for ; Wed, 5 Jun 2019 00:07:37 -0700 (PDT) Received: from resomta-ch2-03v.sys.comcast.net ([69.252.207.99]) by resqmta-ch2-06v.sys.comcast.net with ESMTP id YOm3hOWTxFk3LYQ1JhQVyV; Wed, 05 Jun 2019 07:07:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1559718457; bh=4mmZPA8RSzAPn4z8tPE8BXyXl0InMoarHeOliJHbis0=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=PhZaDOSj7aUGzWewe1lemN0tQEZX4atK1wdYU/7nWtd8jzfE1JxHR4GFmoaS0bMVg KraHAIyUw2P4/4zK79/3YYYaDWqypGI/Qw/016dOdIF86eXMiJFrWzHgaJwyMUE6V8 Y3Flx16AOCWb5wdl3t6Gs0DoxFNVG0pu2kilg/Sh9GFeq42k4Map39A/NU3UxiH6M7 CgqOhCUf8nerSCYUw1US+tI0xsQAP8NFvFppNAJIPINUU529JeGoO848392jQAVphN KXo06EJbEU2hMq3nXcpVfvSOCCb6+d+EUWuRte3IHb0tUQmyiKn3sgoFCMrAj0zXBE HQHUIjvP4iVgg== Received: from unknown ([IPv6:2601:408:c300:8f09:21e:4fff:fec2:a0f1]) by resomta-ch2-03v.sys.comcast.net with ESMTPSA id YQ1HheMvEKrFUYQ1IhgZIx; Wed, 05 Jun 2019 07:07:36 +0000 X-Xfinity-VMeta: sc=0;st=legit To:edbrowse-dev@lists.the-brannons.com From: Karl Dahlke Reply-to: Karl Dahlke References: User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) Subject: [edbrowse-dev] 'this' in a breakpoint Date: Wed, 05 Jun 2019 03:07:35 -0400 Message-ID: <20190505030735.eklhad@comcast.net> X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=nextpart-eb-315195 Content-Transfer-Encoding: 7bit This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --nextpart-eb-315195 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Even if you could pass this to the eval function, and there are ways to = do it, like eval.call(this,$bp), native eval seems to have no respect = for this. It doesn't inject this into the compilation of the string. I fed this to the duktape shell and to the mozilla js shell. You would expect to get 3 and 3, but we get 3 and then undefined. t =3D {x:3, eval:eval, a:function(){print(this.x)}}; t.a(); = t.eval("this.x"); Unless there is some other clever workaround, you'd have to say = window.z=3Dthis,eval($bp) and refer to z as needed, assuming z was not already a local variable, = and remembering to delete z when done (cleaning up), or var z =3D this; eval($bp); if the point of injection allows that = syntax. This is getting kinda awkward but it's all I have. Karl Dahlke --nextpart-eb-315195--