Last Comment Bug 771998 - add Handle<Value> specialization that is better suited for Value
: add Handle<Value> specialization that is better suited for Value
Status: RESOLVED FIXED
[js:t]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla16
Assigned To: Luke Wagner [:luke]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-09 02:09 PDT by Luke Wagner [:luke]
Modified: 2012-07-11 09:32 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (5.14 KB, patch)
2012-07-09 02:09 PDT, Luke Wagner [:luke]
no flags Details | Diff | Splinter Review
patch (7.80 KB, patch)
2012-07-10 15:51 PDT, Luke Wagner [:luke]
wmccloskey: review+
Details | Diff | Splinter Review

Description Luke Wagner [:luke] 2012-07-09 02:09:41 PDT
Created attachment 640159 [details] [diff] [review]
patch

If you have a Handle<Value> h, you might want to write h->isString(), since Handle is pointer-like thing, but this doesn't work because Handle is targeted at GC-thing pointers and thus includes an extra dereference.  For Handle<Value>, it seems like you'd want:

  const Value *operator->() { return ptr; }

so this patch adds a Handle<Value> specialization to do this.
Comment 1 Luke Wagner [:luke] 2012-07-10 15:51:50 PDT
Created attachment 640833 [details] [diff] [review]
patch

This patch adds the Value interface directly to Handle since this is more regular wrt the other Handles (Handle<T> is, roughly speaking, const T &).
Comment 3 Ed Morley [:emorley] 2012-07-11 09:32:22 PDT
https://hg.mozilla.org/mozilla-central/rev/c0c3f78b9850

Note You need to log in before you can comment on or make changes to this bug.