Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merged with upstream
  • Loading branch information
tmeshkova committed Feb 4, 2014
1 parent 515b49e commit 7c7b359
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion embedding/embedlite/modules/EmbedLiteJSON.cpp
Expand Up @@ -85,10 +85,12 @@ ParseObject(JSContext* cx, JSObject* object, nsIWritablePropertyBag2* aBag)
JS::AutoIdArray props(cx, JS_Enumerate(cx, object));
for (size_t i = 0; !!props && i < props.length(); ++i) {
jsid propid = props[i];
JS::Rooted<jsid> id(cx, props[i]);
JS::RootedValue propname(cx);
JS::Rooted<JS::Value> propval(cx);
JS::RootedObject modObj(cx, object);
if (!JS_IdToValue(cx, propid, &propname) ||
!JS_GetPropertyById(cx, object, propid, &propval)) {
!JS_GetPropertyById(cx, modObj, id, &propval)) {
NS_ERROR("Failed to get property by ID");
return NS_ERROR_FAILURE;
}
Expand Down

0 comments on commit 7c7b359

Please sign in to comment.