Closed Bug 1142310 Opened 9 years ago Closed 9 years ago

Stop parenting scripted functions to non-globals

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(2 files)

This is already done for native functions, just scripted ones left.
Depends on: 1142311
Depends on: 1097987
Depends on: 1142832
No longer depends on: 1142832
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Jeff, I basically ignored the silly framescript setup and parented everything to globals anyway.  Hope that's ok.
Comment on attachment 8577371 [details] [diff] [review]
part 1.  Stop parenting scripted functions created via the NewFunction APIs to non-globals

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

::: js/src/jsfun.h
@@ +515,5 @@
>                       NewObjectKind newKind = GenericObject,
>                       JSFunction::Flags flags = JSFunction::NATIVE_CTOR);
>  
>  // Allocate a new scripted function.  If null is passed for
> +// enclosingDynamicScope, the global will be used.  In all cases the parent of

"If enclosingDynamicScope is null" probably wraps better, more readable.
Attachment #8577371 - Flags: review?(jwalden+bmo) → review+
Attachment #8577372 - Flags: review?(jwalden+bmo) → review+
> "If enclosingDynamicScope is null" probably wraps better, more readable.

Done.
https://hg.mozilla.org/mozilla-central/rev/67298a640395
https://hg.mozilla.org/mozilla-central/rev/91b3f8e902a6
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: