Closed Bug 1112943 Opened 10 years ago Closed 10 years ago

[jsdbg2] Cache Debugger.Source.prototype.text

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: shu, Assigned: shu)

Details

Attachments

(1 file)

This ends up allocating a lot, like a lot a lot.
Attachment #8538182 - Flags: review?(jimb)
Comment on attachment 8538182 [details] [diff] [review]
Cache Debugger.Source.text.

Review of attachment 8538182 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/vm/Debugger.cpp
@@ +89,5 @@
>  extern const Class DebuggerSource_class;
>  
>  enum {
>      JSSLOT_DEBUGSOURCE_OWNER,
> +    JSSLOT_DEBUGSOURCE_TEXT,

Do we not need to initialize this slot in Debugger::newDebuggerSource? Are reserved slots initialized to 'undefined' already?
Attachment #8538182 - Flags: review?(jimb) → review+
(In reply to Jim Blandy :jimb from comment #2)
> Comment on attachment 8538182 [details] [diff] [review]
> Cache Debugger.Source.text.
> 
> Review of attachment 8538182 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: js/src/vm/Debugger.cpp
> @@ +89,5 @@
> >  extern const Class DebuggerSource_class;
> >  
> >  enum {
> >      JSSLOT_DEBUGSOURCE_OWNER,
> > +    JSSLOT_DEBUGSOURCE_TEXT,
> 
> Do we not need to initialize this slot in Debugger::newDebuggerSource? Are
> reserved slots initialized to 'undefined' already?

I'll make sure, but I'm pretty sure that reserved slots are initialized automatically.
https://hg.mozilla.org/mozilla-central/rev/5b12b200cbd7
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Assignee: nobody → shu
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: