Ticket #9374 (closed enhancement: fixed)

Opened 8 months ago

Last modified 6 months ago

enable '//@ sourceURL' debug assist for WebKit

Reported by: pmuellr Owned by: peller
Priority: normal Milestone: 1.4
Component: Core Version: 1.3.1
Severity: normal Keywords:
Cc: peller, jburke, dante

Description

In dojo._base._loader.loader.js, in the dojo._loadUri() function, a comment of the form "//@ sourceURL" is appended to source about to be eval()'d, as a debug assist for Firebug.

I've submitted code to WebKit? to enable the same functionality there:

https://bugs.webkit.org/show_bug.cgi?id=25475

Unfortunately, dojo only enables this check if the browser is a Mozilla-based browser (a check if(d.isMoz) is made). I'd like to either have the check removed, or extended to include WebKit?.

I've tested removing the check, and with the WebKit? patch, everything works fine, and you get "named" eval(0's.

Change History

Changed 8 months ago by jburke

  • cc peller added
  • component changed from General to Core
  • milestone changed from tbd to 1.4

Cool! I thought there was a problem with IE if we just removed that check (will have to check with peller), but we should get this in for 1.4.

Changed 8 months ago by peller

  • owner changed from anonymous to peller

Changed 8 months ago by alex

I'd really like a way to test to see if this will be useful before we pay the string concatenation cost. Maybe test for a "good enough" console object?

Changed 8 months ago by peller

  • cc jburke, dante added

I don't think it's future proof to even test against console, and I don't know of any other test, unless we want to switch on isDebug. Even without debugging support for this notation, like in IE, it's sometimes helpful to have this path information visible in the file to help identify the buffer.

I'd take out the browser check entirely if I understood why I could no longer reproduce #5901. Even IE6 doesn't seem to mind when I take out the if(d.isMoz). Maybe this has something to do with the developer using cc_on? Did we used to have that in our code or something?

Changed 8 months ago by peller

  • status changed from new to closed
  • resolution set to fixed

(In [17796]) Inject "//@ sourceURL" debugging hints for all browsers, except IE, where it might conflict with conditional compilation. Fixes #9374.

Changed 6 months ago by pmuellr

For the curious, Safari 4.0.3 now ships the sourceURL hint support for Web Inspector (first release to do so, AFAIK). Current builds of Chromium, do not seem to be shipping the support.

Note: See TracTickets for help on using tickets.