Closed Bug 1278089 Opened 8 years ago Closed 8 years ago

Add JS APIs for determining whether a function is bound and getting the target

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

Details

(Whiteboard: [v8api])

Attachments

(1 file)

      No description provided.
Whiteboard: [v8api]
Assignee: nobody → ehsan
Comment on attachment 8760026 [details] [diff] [review]
Add JS APIs for determining whether a function is bound and getting the target

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

Cool.

::: js/src/jsapi-tests/testBoundFunction.cpp
@@ +26,5 @@
> +    CHECK(!!target);
> +    CHECK(JS_ObjectIsFunction(cx, target));
> +    JS::RootedValue targetVal(cx, JS::ObjectValue(*target));
> +    bool equal = false;
> +    CHECK(JS_StrictlyEqual(cx, foo, targetVal, &equal) && equal);

CHECK_SAME(foo, targetVal);
Attachment #8760026 - Flags: review?(jorendorff) → review+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/49b8cf82bcfc
Add JS APIs for determining whether a function is bound and getting the target; r=jorendorff
https://hg.mozilla.org/mozilla-central/rev/49b8cf82bcfc
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: