Back out bug 653083 because of crashtest crashes (bug698862.html) in PluginInstanceParent::GetNPP for a crashed plugin
This commit is contained in:
@@ -117,7 +117,7 @@ namespace parent {
|
||||
|
||||
JS_STATIC_ASSERT(sizeof(NPIdentifier) == sizeof(jsid));
|
||||
|
||||
inline jsid
|
||||
static inline jsid
|
||||
NPIdentifierToJSId(NPIdentifier id)
|
||||
{
|
||||
jsid tmp;
|
||||
@@ -125,59 +125,52 @@ NPIdentifierToJSId(NPIdentifier id)
|
||||
return tmp;
|
||||
}
|
||||
|
||||
inline NPIdentifier
|
||||
static inline NPIdentifier
|
||||
JSIdToNPIdentifier(jsid id)
|
||||
{
|
||||
return (NPIdentifier)JSID_BITS(id);
|
||||
}
|
||||
|
||||
inline bool
|
||||
static inline bool
|
||||
NPIdentifierIsString(NPIdentifier id)
|
||||
{
|
||||
return JSID_IS_STRING(NPIdentifierToJSId(id));
|
||||
}
|
||||
|
||||
inline JSString *
|
||||
static inline JSString *
|
||||
NPIdentifierToString(NPIdentifier id)
|
||||
{
|
||||
return JSID_TO_STRING(NPIdentifierToJSId(id));
|
||||
}
|
||||
|
||||
inline NPIdentifier
|
||||
static inline NPIdentifier
|
||||
StringToNPIdentifier(JSContext *cx, JSString *str)
|
||||
{
|
||||
return JSIdToNPIdentifier(INTERNED_STRING_TO_JSID(cx, str));
|
||||
}
|
||||
|
||||
inline bool
|
||||
static inline bool
|
||||
NPIdentifierIsInt(NPIdentifier id)
|
||||
{
|
||||
return JSID_IS_INT(NPIdentifierToJSId(id));
|
||||
}
|
||||
|
||||
inline jsint
|
||||
static inline jsint
|
||||
NPIdentifierToInt(NPIdentifier id)
|
||||
{
|
||||
return JSID_TO_INT(NPIdentifierToJSId(id));
|
||||
}
|
||||
|
||||
inline NPIdentifier
|
||||
static inline NPIdentifier
|
||||
IntToNPIdentifier(jsint i)
|
||||
{
|
||||
return JSIdToNPIdentifier(INT_TO_JSID(i));
|
||||
}
|
||||
|
||||
JSContext* GetJSContext(NPP npp);
|
||||
|
||||
inline bool
|
||||
NPStringIdentifierIsPermanent(NPP npp, NPIdentifier id)
|
||||
static inline bool
|
||||
NPIdentifierIsVoid(NPIdentifier id)
|
||||
{
|
||||
JSContext* cx = GetJSContext(npp);
|
||||
if (!cx) // OOM?
|
||||
return false;
|
||||
|
||||
JSAutoRequest ar(cx);
|
||||
return JS_StringHasBeenInterned(cx, NPIdentifierToString(id));
|
||||
return JSID_IS_VOID(NPIdentifierToJSId(id));
|
||||
}
|
||||
|
||||
#define NPIdentifier_VOID (JSIdToNPIdentifier(JSID_VOID))
|
||||
|
||||
Reference in New Issue
Block a user