CRASH while using JS_NewStringCopyZ in FF 24

Discuss building things with or for the Mozilla Platform.
Post Reply
Ansh1337
Posts: 3
Joined: April 30th, 2013, 5:43 pm

CRASH while using JS_NewStringCopyZ in FF 24

Post by Ansh1337 »

Hello All,

I am getting a crash while using JS_NewStringCopyZ function.. here is the code snippet:


nsCOMPtr<nsIScriptGlobalObject> spScriptGlobalObject = do_QueryInterface(m_spDOMWindow); // m_spDOMWindow = nsIDOMWindow
nsCOMPtr<nsIScriptContext> spScriptContext = spScriptGlobalObject->GetContext();
JSContext* cx = spScriptContext->GetNativeContext();
JS_NewStringCopyZ(cx, “test”);

CX is valid (i.e. Not NULL) and it has worked in every single version of Firefox until now (FF24)

Can somebody please provide their thoughts on this?

Thanks
Post Reply