servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 122 forks source link

Use ObjectPrivateVisitor derived class in CollectServoSizes to measure heap usage of DOM objects #409

Closed aeweston98 closed 6 years ago

aeweston98 commented 6 years ago

This PR contains the updates in rust-mozjs necessary for servo issue 7084. A new class which derives from ObjectPrivateVisitor was added. It is used in CollectServoSizes, with an instance being passed into AddServoSizeOf instead of a nullptr. An additional function was added (InitializeMemoryReporter) which sets the value of a global function pointer, which is used to check if we want to measure the heap usage for a particular JSObject.


This change is Reviewable

jdm commented 6 years ago

One last change - to publish these changes, please update the version number in Cargo.toml to 0.5.0.

bors-servo commented 6 years ago

:umbrella: The latest upstream changes (presumably #412) made this pull request unmergeable. Please resolve the merge conflicts.

aeweston98 commented 6 years ago

@jdm OK, updated to latest master after conflicts with pr 412. All of your previous comments should be fixed, and commits have been squashed.

jdm commented 6 years ago

@bors-servo r+ Great!

bors-servo commented 6 years ago

:pushpin: Commit a9566ed has been approved by jdm

bors-servo commented 6 years ago

:hourglass: Testing commit a9566ed6dab2320aca8db271f5673ade34bd2266 with merge 0ff4db7d67a488dee943e94e66465260f703861f...

bors-servo commented 6 years ago

:sunny: Test successful - status-appveyor, status-travis Approved by: jdm Pushing 0ff4db7d67a488dee943e94e66465260f703861f to master...