I mean that we have to find out how the calling function looks like so I 
was wondering if we could run your debug solution whenever a webpage loads, 
like if I could stop the page and observe what the code looks like 
On Thursday, May 18, 2023 at 12:16:26 AM UTC+5:30 PhistucK wrote:

> If you change Chromium anyway, you can just add a log/CHECK or something 
> in the has/delete implementation itself, right?
>
> ☆*PhistucK*
>
>
> On Wed, May 17, 2023 at 5:50 PM Debadree Chatterjee <debad...@gmail.com> 
> wrote:
>
>> Is it possible to put these methods on Chrome startup? Like because 
>> loading the page would clear up devtools so in my local chromium if I could 
>> make these changes? any idea about which files would be relevant?
>>
>> On Wednesday, May 17, 2023 at 10:11:51 PM UTC+5:30 Debadree Chatterjee 
>> wrote:
>>
>>> Hey!
>>>
>>> Phistuck's method sounds interesting! I am giving it a try and reporting 
>>> back! Thank you so much, everyone!
>>>
>>> On Wednesday, May 17, 2023 at 10:09:10 PM UTC+5:30 Philip Jägenstedt 
>>> wrote:
>>>
>>>> Thanks PhistucK, I didn't know about these devtools tricks :D
>>>>
>>>> On Wed, May 17, 2023 at 6:31 PM PhistucK <phis...@gmail.com> wrote:
>>>>
>>>>> Excessive, but you can run this in the console -
>>>>> debug(URLSearchParams.prototype.has)
>>>>> debug(URLSearchParams.prototype.delete)
>>>>> That will break whenever those are called.
>>>>> If you want it to break less, you can replace the functions with your 
>>>>> own and run debugger; in case there is more than one parameter -
>>>>> var originalHas = URLSearchParams.prototype.has;
>>>>> URLSearchParams.prototype.has = (...a) => { if (a.length > 1) 
>>>>> debugger; return originalHas.call(this, ...a); }
>>>>> var originalDelete = URLSearchParams.prototype.delete;
>>>>> URLSearchParams.prototype.delete = (...a) => { if (a.length > 1) 
>>>>> debugger; return originalDelete.call(this, ...a); }
>>>>> But make sure you run this very early on the page somehow.
>>>>>
>>>>> ☆*PhistucK*
>>>>>
>>>>>
>>>>> On Wed, May 17, 2023 at 5:17 PM Philip Jägenstedt <foo...@chromium.org> 
>>>>> wrote:
>>>>>
>>>>>> Hi Debadree, minified code is OK, all we need to see is what the call 
>>>>>> site looks like. In particular is it an explicit and intentional extra 
>>>>>> arg 
>>>>>> like `someUrl.searchParams.delete('something', extraArg)`, or is it a 
>>>>>> callback involving forEach or similar?
>>>>>>
>>>>>> With some way to break in devtools at the code path in question, it 
>>>>>> should be a question of stepping up the call stack one level. The most 
>>>>>> straightforward way to do this would be a local change to Chromium, to 
>>>>>> make 
>>>>>> the methods throw an exception if given and extra argument, and then 
>>>>>> looking for the exception in devtools.
>>>>>>
>>>>>> Does that sound workable? If it's unreasonably hard to do, then we 
>>>>>> need some other way to understand what the usage in the wild is about.
>>>>>>
>>>>>> On Wed, May 17, 2023 at 5:27 PM Debadree Chatterjee <
>>>>>> debad...@gmail.com> wrote:
>>>>>>
>>>>>>> Hey Everyone!
>>>>>>>
>>>>>>> I am writing to seek some help regarding identifying code patterns 
>>>>>>> as you say, almost all the code in these sites seems to be minified 
>>>>>>> compacted so quite difficult to find manually does anyone know a better 
>>>>>>> way 
>>>>>>> to go about it? like is there an example of maybe modifying some code 
>>>>>>> in 
>>>>>>> Chrome to detect these code patterns? 
>>>>>>>
>>>>>>> Yours Sincerely,
>>>>>>> Debadree
>>>>>>> On Monday, May 15, 2023 at 10:06:05 PM UTC+5:30 PhistucK wrote:
>>>>>>>
>>>>>>>> It would be something like this -
>>>>>>>>
>>>>>>>> https://groups.google.com/a/chromium.org/g/blink-dev/c/rDaQdKpWAx8/m/qjTlRNShAgAJ
>>>>>>>>
>>>>>>>> ☆*PhistucK*
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, May 15, 2023 at 10:25 AM Philip Jägenstedt <
>>>>>>>> foo...@chromium.org> wrote:
>>>>>>>>
>>>>>>>>> Hey Andreu,
>>>>>>>>>
>>>>>>>>> Can you give an example of what the code looks like that calls the 
>>>>>>>>> methods with a second argument?
>>>>>>>>>
>>>>>>>>> Best regards,
>>>>>>>>> Philip
>>>>>>>>>
>>>>>>>>> On Fri, May 12, 2023 at 8:51 PM Andreu Botella <abot...@igalia.com> 
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> jornalmassa.com.br doesn't seem to be calling these methods with 
>>>>>>>>>> two arguments, at least in my testing. The rest of sites do 
>>>>>>>>>> occasionally 
>>>>>>>>>> (sometimes with the second argument being 0, sometimes a 
>>>>>>>>>> different number, sometimes a string), but none seemed to break in 
>>>>>>>>>> my 
>>>>>>>>>> testing.
>>>>>>>>>>
>>>>>>>>>> Andreu
>>>>>>>>>> On 5/12/23 10:38, Philip Jägenstedt wrote:
>>>>>>>>>>
>>>>>>>>>> It looks like this was spec'd in 
>>>>>>>>>> https://github.com/whatwg/url/pull/735, with participation from 
>>>>>>>>>> Chromium and WebKit folks. 
>>>>>>>>>> https://bugzilla.mozilla.org/show_bug.cgi?id=1831587 was filed 
>>>>>>>>>> for Gecko, but there's no clear position. Would you mind filing an 
>>>>>>>>>> issue at 
>>>>>>>>>> https://github.com/mozilla/standards-positions/issues/new to 
>>>>>>>>>> ensure Mozilla is aware this happening? 
>>>>>>>>>>
>>>>>>>>>> https://chromestatus.com/metrics/feature/timeline/popularity/4478 
>>>>>>>>>> is pretty low, but was any analysis done of sites that reach this 
>>>>>>>>>> use 
>>>>>>>>>> counter? It's honestly higher usage than I'd expect for an argument 
>>>>>>>>>> that 
>>>>>>>>>> didn't do anything before, so likely the value passed doesn't make 
>>>>>>>>>> sense 
>>>>>>>>>> and will result in the parameter not being deleted for delete(), 
>>>>>>>>>> which 
>>>>>>>>>> could be a problem. What can you say about usage in the wild here?
>>>>>>>>>>
>>>>>>>>>> +Andreu Botella 
>>>>>>>>>>
>>>>>>>>>> On Fri, May 12, 2023 at 9:30 AM Debadree Chatterjee <
>>>>>>>>>> debad...@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Contact emails debad...@gmail.com
>>>>>>>>>>>
>>>>>>>>>>> Explainer None
>>>>>>>>>>>
>>>>>>>>>>> Specification 
>>>>>>>>>>> https://url.spec.whatwg.org/#dom-urlsearchparams-has
>>>>>>>>>>>
>>>>>>>>>>> Summary 
>>>>>>>>>>>
>>>>>>>>>>> This feature adds the ability to pass a `value` argument to 
>>>>>>>>>>> URLSearchParams's has() and delete() methods which allow for 
>>>>>>>>>>> deleting 
>>>>>>>>>>> tuples stored in URLSearchParams either by the `name` parameter or 
>>>>>>>>>>> by the 
>>>>>>>>>>> combination of `name` and `value`
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Blink component Blink 
>>>>>>>>>>> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink>
>>>>>>>>>>>
>>>>>>>>>>> TAG review None
>>>>>>>>>>>
>>>>>>>>>>> TAG review status Not applicable
>>>>>>>>>>>
>>>>>>>>>>> Risks 
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Interoperability and Compatibility Compatibility with existing 
>>>>>>>>>>> websites were tested by means of a Counter in chromium, ref: 
>>>>>>>>>>> https://github.com/whatwg/url/pull/735#issuecomment-1441503315 and 
>>>>>>>>>>> no significant chances of breaking were found
>>>>>>>>>>>
>>>>>>>>>>> *Gecko*: No signal
>>>>>>>>>>>
>>>>>>>>>>> *WebKit*: No signal
>>>>>>>>>>>
>>>>>>>>>>> *Web developers*: Has Shipped (
>>>>>>>>>>> https://github.com/WebKit/WebKit/pull/13500)
>>>>>>>>>>>
>>>>>>>>>>> *Other signals*:
>>>>>>>>>>>
>>>>>>>>>>> WebView application risks 
>>>>>>>>>>>
>>>>>>>>>>> Does this intent deprecate or change behavior of existing APIs, 
>>>>>>>>>>> such that it has potentially high risk for Android WebView-based 
>>>>>>>>>>> applications?
>>>>>>>>>>>
>>>>>>>>>>> None expected
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Debuggability None
>>>>>>>>>>>
>>>>>>>>>>> Will this feature be supported on all six Blink platforms 
>>>>>>>>>>> (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)? 
>>>>>>>>>>> Yes
>>>>>>>>>>>
>>>>>>>>>>> Is this feature fully tested by web-platform-tests 
>>>>>>>>>>> <https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>
>>>>>>>>>>> ? 
>>>>>>>>>>> Yes
>>>>>>>>>>>
>>>>>>>>>>> Flag name 
>>>>>>>>>>>
>>>>>>>>>>> Requires code in //chrome? False
>>>>>>>>>>>
>>>>>>>>>>> Tracking bug 
>>>>>>>>>>> https://bugs.chromium.org/p/chromium/issues/detail?id=1442916
>>>>>>>>>>>
>>>>>>>>>>> Estimated milestones 
>>>>>>>>>>>
>>>>>>>>>>> No milestones specified
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Anticipated spec changes 
>>>>>>>>>>>
>>>>>>>>>>> Open questions about a feature may be a source of future web 
>>>>>>>>>>> compat or interop issues. Please list open issues (e.g. links to 
>>>>>>>>>>> known 
>>>>>>>>>>> github issues in the project for the feature specification) whose 
>>>>>>>>>>> resolution may introduce web compat/interop risk (e.g., changing to 
>>>>>>>>>>> naming 
>>>>>>>>>>> or structure of the API in a non-backward-compatible way).
>>>>>>>>>>> None Expected
>>>>>>>>>>>
>>>>>>>>>>> Link to entry on the Chrome Platform Status 
>>>>>>>>>>> https://chromestatus.com/feature/5147732899004416
>>>>>>>>>>>
>>>>>>>>>>> Links to previous Intent discussions Intent to prototype: 
>>>>>>>>>>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CFBE060E-9D1C-4B8D-A4FB-B0279D73E6F4%40gmail.com
>>>>>>>>>>>
>>>>>>>>>>> This intent message was generated by Chrome Platform Status 
>>>>>>>>>>> <https://chromestatus.com/>.
>>>>>>>>>>> -- 
>>>>>>>>>>> You received this message because you are subscribed to the 
>>>>>>>>>>> Google Groups "blink-dev" group.
>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from 
>>>>>>>>>>> it, send an email to blink-dev+...@chromium.org.
>>>>>>>>>>> To view this discussion on the web visit 
>>>>>>>>>>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/A73025EA-70D7-4818-9CFF-AE14B48875F0%40gmail.com
>>>>>>>>>>>  
>>>>>>>>>>> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/A73025EA-70D7-4818-9CFF-AE14B48875F0%40gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>>>>> .
>>>>>>>>>>>
>>>>>>>>>> -- 
>>>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>>>> Groups "blink-dev" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>>> send an email to blink-dev+...@chromium.org.
>>>>>>>>>
>>>>>>>> To view this discussion on the web visit 
>>>>>>>>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYcgT4HVYsB3tsDEpA%2B4-niBhZv5Op-ztxCi-Ae9mdAzdQ%40mail.gmail.com
>>>>>>>>>  
>>>>>>>>> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYcgT4HVYsB3tsDEpA%2B4-niBhZv5Op-ztxCi-Ae9mdAzdQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to blink-dev+unsubscr...@chromium.org.
To view this discussion on the web visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/3c734900-f937-4b08-a8f7-581013ee7047n%40chromium.org.

Reply via email to