Closed Bug 1150247 Opened 10 years ago Closed 10 years ago

Check if value is function before binding

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(firefox40 fixed)

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: erahm, Assigned: erahm)

References

Details

(Keywords: pi-marionette-server)

Attachments

(1 file)

Currently exception based logic is used to determine whether an export needs to be bound or not. This generates a fair amount of excpetions which themselves contain rather large stacks. We can reduce this overhead by simply checking whether the value is a function or not.
Rather than attempting to bind non-functions and catching the exception this explicitly checks if it is a function. This helps reduce memory consumption needed for the exception stack traces. Realistically that will go away when GC is run, but it throws off memory measurments prior to that.
Summary: Bug nnnn - Check if value is function before binding → Check if value is function before binding
Attachment #8587029 - Attachment description: Bug nnnn - Check if value is function before binding → Bug 1150247 - Check if value is function before binding
Comment on attachment 8587029 [details] [diff] [review] Bug 1150247 - Check if value is function before binding :ato, does this seem reasonable to you?
Attachment #8587029 - Flags: review?(ato)
Comment on attachment 8587029 [details] [diff] [review] Bug 1150247 - Check if value is function before binding Review of attachment 8587029 [details] [diff] [review]: ----------------------------------------------------------------- This looks good to me! It's worth noting that this code didn't change in bug 1107706, but it's a welcome change.
Attachment #8587029 - Flags: review?(ato) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: