mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge
This commit is contained in:
commit
ba139e6639
@ -1183,11 +1183,13 @@ ScriptSource::createFromSource(JSContext *cx, const jschar *src, uint32_t length
|
||||
ScriptSource *ss = static_cast<ScriptSource *>(cx->malloc_(sizeof(*ss)));
|
||||
if (!ss)
|
||||
return NULL;
|
||||
const size_t memlen = length * sizeof(jschar);
|
||||
ss->data.compressed = static_cast<unsigned char *>(cx->malloc_(memlen));
|
||||
if (!ss->data.compressed) {
|
||||
cx->free_(ss);
|
||||
return NULL;
|
||||
if (!ownSource) {
|
||||
const size_t memlen = length * sizeof(jschar);
|
||||
ss->data.compressed = static_cast<unsigned char *>(cx->malloc_(memlen));
|
||||
if (!ss->data.compressed) {
|
||||
cx->free_(ss);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
ss->next = NULL;
|
||||
ss->length_ = length;
|
||||
|
Loading…
Reference in New Issue
Block a user