Bug 636818 - Crash [@ js::CallJSPropertyOpSetter] or [@ js_SetProperty]. r=gal, a=dmandelin.

--HG--
extra : rebase_source : ffda69df6aa059fac4e742c905573809695c7765
This commit is contained in:
Jason Orendorff 2011-03-02 14:15:57 -06:00
parent ae23ba470a
commit c5c4eeabcf
5 changed files with 14 additions and 47 deletions

View File

@ -5586,8 +5586,10 @@ js_SetPropertyHelper(JSContext *cx, JSObject *obj, jsid id, uintN defineHow,
if (!JSProxy::getPropertyDescriptor(cx, pobj, id, true, &pd))
return false;
if (pd.attrs & JSPROP_SHARED)
return CallSetter(cx, obj, id, pd.setter, pd.attrs, pd.shortid, strict, vp);
if ((pd.attrs & (JSPROP_SHARED | JSPROP_SHADOWABLE)) == JSPROP_SHARED) {
return !pd.setter ||
CallSetter(cx, obj, id, pd.setter, pd.attrs, pd.shortid, strict, vp);
}
if (pd.attrs & JSPROP_READONLY) {
if (strict)

View File

@ -112,7 +112,7 @@ bool
JSWrapper::getPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id,
bool set, PropertyDescriptor *desc)
{
desc->obj= NULL; // default result if we refuse to perform this action
desc->obj = NULL; // default result if we refuse to perform this action
CHECKED(JS_GetPropertyDescriptorById(cx, wrappedObject(wrapper), id, JSRESOLVE_QUALIFIED,
Jsvalify(desc)), set ? SET : GET);
}

View File

@ -34,3 +34,4 @@ script regress-627984-6.js
script regress-627984-7.js
script regress-630377.js
script regress-631723.js
script regress-636818.js

View File

@ -0,0 +1,8 @@
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/licenses/publicdomain/
a = evalcx('');
a.__proto__ = ''.__proto__;
a.length = 3; // don't assert
reportCompare(0, 0, 'ok');

View File

@ -1,44 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Terry Hayes <thayes@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
[scriptable, uuid(8de811f0-1dd2-11b2-8bf1-e9aa324984b2)]
interface nsISSLStatusProvider : nsISupports {
readonly attribute nsISupports SSLStatus;
};