diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-06-08 23:46:41 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:27 -0400 |
commit | 761b3afca59ba1c24337ff3afe0c91d005f7718b (patch) | |
tree | e4112b321901610e104693d386eeccdae92bc372 /js/src/jsstr.cpp | |
parent | 08aee2f9d9948c9a4540706d40ea4abf01f452a5 (diff) | |
download | uxp-761b3afca59ba1c24337ff3afe0c91d005f7718b.tar.gz |
1320408 - Part 18: Change StringObject::init to static method.
Diffstat (limited to 'js/src/jsstr.cpp')
-rw-r--r-- | js/src/jsstr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp index fdb62a6794..74f61b87dc 100644 --- a/js/src/jsstr.cpp +++ b/js/src/jsstr.cpp @@ -2918,7 +2918,10 @@ js::InitStringClass(JSContext* cx, HandleObject obj) Rooted<JSString*> empty(cx, cx->runtime()->emptyString); RootedObject proto(cx, GlobalObject::createBlankPrototype(cx, global, &StringObject::class_)); - if (!proto || !proto->as<StringObject>().init(cx, empty)) + if (!proto) + return nullptr; + Handle<StringObject*> protoObj = proto.as<StringObject>(); + if (!StringObject::init(cx, protoObj, empty)) return nullptr; /* Now create the String function. */ |