mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 893222 - Part 0: Make JSRope::getCharsNonDestructiveInternal work with a null tcx. r=bhackett
This commit is contained in:
parent
57186da9cf
commit
34e006b755
@ -185,7 +185,12 @@ JSRope::getCharsNonDestructiveInternal(ThreadSafeContext *cx, ScopedJSFreePtr<js
|
||||
*/
|
||||
|
||||
size_t n = length();
|
||||
jschar *s = cx->pod_malloc<jschar>(n + 1);
|
||||
jschar *s;
|
||||
if (cx)
|
||||
s = cx->pod_malloc<jschar>(n + 1);
|
||||
else
|
||||
s = js_pod_malloc<jschar>(n + 1);
|
||||
|
||||
if (!s)
|
||||
return false;
|
||||
jschar *pos = s;
|
||||
|
Loading…
Reference in New Issue
Block a user