Why don't you explain exactly the problem is?

2013/10/31 johnhypo <hypoj...@gmail.com>:
> 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.What's more,add-ons are not supported.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.Why getting property "location" works well while getting 
> property "href" causes problems?
> Could someone help me?
> Help!Thanks!
> _______________________________________________
> dev-tech-js-engine-internals mailing list
> dev-tech-js-engine-internals@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals



-- 
Regards,
Benjamin
_______________________________________________
dev-tech-js-engine-internals mailing list
dev-tech-js-engine-internals@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to