Closed Bug 790728 Opened 12 years ago Closed 12 years ago

nsDOMCameraManager::GetListOfCameras doesn't root a

Categories

(Firefox OS Graveyard :: General, defect)

x86_64
Windows 7
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: timeless, Unassigned)

References

()

Details

(Keywords: csectype-oom)

27 nsDOMCameraManager::GetListOfCameras(JSContext* cx, JS::Value* _retval)
29   JSObject* a = JS_NewArrayObject(cx, 0, nullptr);
not rooted

58         v = JS_NewStringCopyZ(cx, "back");
GC

63         v = JS_NewStringCopyZ(cx, "front");
GC

73           v = JS_NewStringCopyZ(cx, s.get());
GC

84     if (!JS_SetElement(cx, a, index, &jv)) {
roots v to a non rooted a

91   *_retval = OBJECT_TO_JSVAL(a);
almost rooted (by caller) - way too late
This is handled by the stack scanner.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Group: core-security
You need to log in before you can comment on or make changes to this bug.