Bug 838146 followup: address missed review comments. r=bholley
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 16 Jul 2013 01:39:49 -0400
changeset 138641 0e32217fa89916abb8549bb19ec5c0c7f602fec1
parent 138640 fc6ed6c8050087b947e60c02d9017fac06ff7901
child 138642 2ea7a92b0074fa7d474a89899e61047539686786
push id24964
push userryanvm@gmail.com
push dateTue, 16 Jul 2013 20:04:09 +0000
treeherderautoland@fd10ead17ace [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs838146
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 838146 followup: address missed review comments. r=bholley
dom/base/nsDOMClassInfo.cpp
dom/bindings/Codegen.py
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -4655,17 +4655,17 @@ nsLocationSH::AddProperty(nsIXPConnectWr
 NS_IMETHODIMP
 nsNavigatorSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                           JSObject *aObj, jsid aId, uint32_t flags,
                           JSObject **objp, bool *_retval)
 {
   JS::Rooted<JSObject*> obj(cx, aObj);
   JS::Rooted<jsid> id(cx, aId);
   nsCOMPtr<nsIDOMNavigator> navigator = do_QueryWrappedNative(wrapper);
-  JS::Rooted<JS::Value> value(cx);
+  JS::Rooted<JS::Value> value(cx, JS::UndefinedValue());
   if (!static_cast<Navigator*>(navigator.get())->DoNewResolve(cx, obj, id,
                                                               &value)) {
     return NS_ERROR_FAILURE;
   }
 
   if (!value.isUndefined()) {
     if (!JS_DefinePropertyById(cx, obj, id, value, JS_PropertyStub,
                                JS_StrictPropertyStub, JSPROP_ENUMERATE)) {
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -6678,17 +6678,17 @@ class CGResolveOwnPropertyViaNewresolve(
                                          callArgs="", returnType="bool")
     def generate_code(self):
         return CGIndenter(CGGeneric(
                 "JS::Rooted<JS::Value> value(cx);\n"
                 "if (!self->DoNewResolve(cx, obj, id, &value)) {\n"
                 "  return false;\n"
                 "}\n"
                 "if (!value.isUndefined()) {\n"
-                "  FillPropertyDescriptor(desc, wrapper, value, false);\n"
+                "  FillPropertyDescriptor(desc, wrapper, value, /* readonly = */ false);\n"
                 "}\n"
                 "return true;"))
 
 class CGEnumerateOwnProperties(CGAbstractStaticMethod):
     def __init__(self, descriptor):
         args = [Argument('JSContext*', 'cx'),
                 Argument('JS::Handle<JSObject*>', 'wrapper'),
                 Argument('JS::Handle<JSObject*>', 'obj'),