command:firefox -new-tab url invalid

Discussion of third-party/unofficial Firefox/Thunderbird/SeaMonkey builds.
Post Reply
johnhypo
Posts: 9
Joined: October 8th, 2013, 12:37 am

command:firefox -new-tab url invalid

Post by johnhypo »

OS:Centos 6.4

Firefox version: firefox-23.0.source

I downloaded the source code and built it and it worked well.After I modified the file js/src/jsstr.cpp,when I rum command:./firfox –new-tab url,firefox starts a new window with one blank page tab.Normally,it should open one new tab with the url.I just modified one function: template <AllowGC allowGC>JSStableString *js_NewString(JSContext *cx, jschar *chars, size_t length);

--------------------------------------------------------------------------------------------------------------------------------

The original code:



template <AllowGC allowGC>

JSStableString *

js_NewString(JSContext *cx, jschar *chars, size_t length)

{

return JSStableString::new_<allowGC>(cx, chars, length);

}

--------------------------------------------------------------------------------------------------------------------------------

My modified code:



template <AllowGC allowGC>

JSStableString *

js_NewString(JSContext *cx, jschar *chars, size_t length)

{



JSObject *hypo_object=JS_GetGlobalForScopeChain(cx); //get global object whose property location.href contains webpage url

JS::Value vp;

JS_GetProperty(cx,hypo_object,"location",&vp) ; //get location property

JS_GetProperty(cx,&(vp.toObject()),"href",&vp); //get href property



return JSStableString::new_<allowGC>(cx, chars, length);

}


I want to use command ./firefox –new-tab url.Unfortunately,modifying jsstr.cpp made it invalid.It is the line JS_GetProperty(cx,&(vp.toObject()),"href",&vp); that makes command ./firefo -new-tab url invalid.Could someone help me?

Help!Thanks!
User avatar
LIMPET235
Moderator
Posts: 39956
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Re: command:firefox -new-tab url invalid

Post by LIMPET235 »

Moving to 3rd Part builds...
[Ancient Amateur Astronomer.]
Win-10-H/64 bit/500G SSD/16 Gig Ram/450Watt PSU/350WattUPS/Firefox-115.0.2/T-bird-115.3.2./SnagIt-v10.0.1/MWP-7.12.125.

(Always choose the "Custom" Install.)
Post Reply