If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

dehydra jsapi update: remove JSScript and callable regex

RESOLVED FIXED

Status

()

Core
Rewriting and Analysis
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Ehren Metcalfe, Assigned: Ehren Metcalfe)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

2.67 KB, patch
(dormant account)
: review+
Details | Diff | Splinter Review
(Assignee)

Description

7 years ago
Created attachment 518799 [details] [diff] [review]
patch

tested w/ mc, tm and 1.8.0
Attachment #518799 - Flags: review?(tglek)

Comment 1

7 years ago
Comment on attachment 518799 [details] [diff] [review]
patch


>+/* JSScript removed from JSAPI in newer SpiderMonkeys */
>+#ifndef JS_NewScriptObject
>+#define JS_NewScriptObject(cx, script) (script)
>+#define JSScript JSObject
>+#endif

Just remove JS_Script* from source
Attachment #518799 - Flags: review?(tglek) → review-
(Assignee)

Comment 2

7 years ago
> Just remove JS_Script* from source

I took the fix from http://groups.google.com/group/mozilla.dev.tech.js-engine/browse_thread/thread/78ec91ce03319d3a?tvc=2

context:

  JSScript *script = JS_CompileScript(this->cx, namespace,
                                      content, size, realname, 1);
  free(realname);
  if (script == NULL) {
    xassert(JS_IsExceptionPending(this->cx));
    return JS_FALSE;
  }

  JSObject *sobj = JS_NewScriptObject(this->cx, script);
  JS_AddNamedObjectRoot(this->cx, &sobj, filename);
  jsval rval;
  JSBool rv = JS_ExecuteScript(this->cx, namespace, script, &rval);
  JS_RemoveObjectRoot(this->cx, &sobj);

Old sm still expects a JSScript for JS_CompileScript and JS_ExecuteScript or are you saying drop old spidermonkey? :)

Comment 3

7 years ago
yes, drop preff4 spidermonkey
(Assignee)

Comment 4

7 years ago
Created attachment 518827 [details] [diff] [review]
patch

only tested on mc tip but jsapi should be same as branch
Attachment #518799 - Attachment is obsolete: true
Attachment #518827 - Flags: review?(tglek)

Comment 5

7 years ago
Comment on attachment 518827 [details] [diff] [review]
patch

thanks
Attachment #518827 - Flags: review?(tglek) → review+
(Assignee)

Comment 6

7 years ago
np, http://hg.mozilla.org/rewriting-and-analysis/dehydra/rev/9871caaedb8f
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.