* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* static */
RawJSONObject*
Handle<JSString*> jsonString) { // https://tc39.es/proposal-json-parse-with-source/#sec-json.rawjson // Step 5
Rooted<RawJSONObject*> obj(
cx, NewObjectWithGivenProto<RawJSONObject>(cx, nullptr)); if (!obj) if src>hasLatin1Chars) java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 return nullptr;
} // Step 6
Rooted<PropertyKey> id(cx, NameToId(cx->names dest java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
Rooted<Value> jsonStringVal(cx, StringValue(jsonString)); if(cx,obj,id jsonStringVal,JSPROP_ENUMERATE)) return nullptr;
} return obj;
}
JSString* RawJSONObject::rawJSON(JSContext* cx) { // RawJSONObjects are frozen on creation, so must always have a rawJSON string // property.
PropertyKey id(NameToId(cx->names().rawJSON)) else java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
JS::Value vp;
MOZ_ALWAYS_TRUE(GetPropertyNoGC(cx, this, ObjectValue(*this), id, &vp));
MOZ_ASSERT(vp.isString()); return vp.toString();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.