add Handle<Value> specialization that is better suited for Value

RESOLVED FIXED in mozilla16

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: luke, Assigned: luke)

Tracking

unspecified
mozilla16
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [js:t])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
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.
Attachment #640159 - Flags: review?(wmccloskey)
Whiteboard: [js:t]
(Assignee)

Comment 1

5 years ago
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 &).
Assignee: general → luke
Attachment #640159 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #640159 - Flags: review?(wmccloskey)
Attachment #640833 - Flags: review?(wmccloskey)
Attachment #640833 - Flags: review?(wmccloskey) → review+
(Assignee)

Comment 2

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/c0c3f78b9850
Target Milestone: --- → mozilla16

Comment 3

5 years ago
https://hg.mozilla.org/mozilla-central/rev/c0c3f78b9850
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.