Closed
Bug 570561
Opened 14 years ago
Closed 14 years ago
dehydra: use JS_NewGlobalObject
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ehren.m, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
2.39 KB,
patch
|
taras.mozilla
:
review+
|
Details | Diff | Splinter Review |
Need to switch JS_NewObject to JS_NewGlobalObject due to API change in bug 570040. Waiting on review until other SM issues have been straightened out.
Reporter | ||
Comment 1•14 years ago
|
||
added JS_HAS_NEW_GLOBAL_OBJECT check (for old SpiderMonkey).
Attachment #449690 -
Attachment is obsolete: true
Attachment #449762 -
Flags: review?(tglek)
Comment 2•14 years ago
|
||
Comment on attachment 449762 [details] [diff] [review] patch >diff --git a/dehydra.c b/dehydra.c >--- a/dehydra.c >+++ b/dehydra.c >+static JSClass global_class = { >+ "DehydraGlobal", /* name */ >+ JSCLASS_GLOBAL_FLAGS, /* flags */ >+ JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, >+ JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub, >+ JSCLASS_NO_OPTIONAL_MEMBERS >+}; >+ No need for a new stub class. Use js_ObjectClass
Attachment #449762 -
Flags: review?(tglek) → review+
Reporter | ||
Comment 3•14 years ago
|
||
isn't js_ObjectClass declared in jsobj.h? I can't include that because dehydra.c is compiled by cc.
Comment 4•14 years ago
|
||
(In reply to comment #3) > isn't js_ObjectClass declared in jsobj.h? I can't include that because > dehydra.c is compiled by cc. copy the extern declaration from the header? I see no need to declare another stub.
Reporter | ||
Comment 5•14 years ago
|
||
kinda weird... nm reports js_ObjectClass is defined in both libjs_static.a and libmozjs.so but compiling this: // blah.cpp #include <jsapi.h> #include <jsobj.h> // alternately, comment out and declare |extern JSClass js_ObjectClass;| int main() { printf("%x\n", &js_ObjectClass); } g++ -I/home/ehren/SpiderMonkey/include/js/ -I/home/ehren/SpiderMonkey/lib blah.cpp blah.cpp:(.text+0x5): undefined reference to `js_ObjectClass'
Comment 6•14 years ago
|
||
If this is causing this much trouble, just use your original patch.
Comment 7•14 years ago
|
||
It's not exported, so you can't use it.
Reporter | ||
Comment 8•14 years ago
|
||
http://hg.mozilla.org/rewriting-and-analysis/dehydra/rev/d55889f23932
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Core → Firefox Build System
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•