The default bug view has changed. See this FAQ.

Remove JSVAL_IS_OBJECT from the source tree.

RESOLVED FIXED in mozilla15

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: evilpie, Assigned: evilpie)

Tracking

Trunk
mozilla15
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 629214 [details] [diff] [review]
Remove JSVAL_IS_OBJECT

People still introduce new uses of JSVAL_IS_OBJECT, which are again incorrect. (See http://dxr.lanedo.com/mozilla-central/dom/system/OSFileConstants.cpp.html#l258).

I am not a fan of breaking the API, but I would guess even embedders get this wrong. JSVAL_TO_OBJECT is going to be removed a bit later.
Attachment #629214 - Flags: review?(dmandelin)
Comment on attachment 629214 [details] [diff] [review]
Remove JSVAL_IS_OBJECT

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

::: dom/system/OSFileConstants.cpp
@@ +257,5 @@
>   */
>  JSObject *GetOrCreateObjectProperty(JSContext *cx, JSObject *aObject,
>                                      const char *aProperty)
>  {
> +  js::Value val;

JS::Value

@@ +259,5 @@
>                                      const char *aProperty)
>  {
> +  js::Value val;
> +  if (!JS_GetProperty(cx, aObject, aProperty, &val))
> +    return NULL;

{}

@@ +263,5 @@
> +    return NULL;
> +
> +  if (!val.isUndefined()) {
> +    if (val.isObject())
> +      return &val.toObject();

{}
Comment on attachment 629214 [details] [diff] [review]
Remove JSVAL_IS_OBJECT

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

r+ on the jseng part. Please do address Ms2ger's comments on the DOM part.
Attachment #629214 - Flags: review?(dmandelin) → review+
(Assignee)

Comment 3

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/2f02e08e634c
Landed but referred to the wrong bug :/
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/2f02e08e634c
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.