mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1142817 - Use UniquePtr in testXDR_sourceMap. r=erahm
This commit is contained in:
parent
d49f96c2aa
commit
40a443dfad
@ -12,6 +12,8 @@
|
||||
|
||||
#include "jsscriptinlines.h"
|
||||
|
||||
using mozilla::UniquePtr;
|
||||
|
||||
static JSScript*
|
||||
FreezeThaw(JSContext* cx, JS::HandleScript script)
|
||||
{
|
||||
@ -129,7 +131,8 @@ BEGIN_TEST(testXDR_sourceMap)
|
||||
CHECK(script);
|
||||
|
||||
size_t len = strlen(*sm);
|
||||
char16_t* expected = js::InflateString(cx, *sm, &len);
|
||||
UniquePtr<char16_t,JS::FreePolicy> expected_wrapper(js::InflateString(cx, *sm, &len));
|
||||
char16_t *expected = expected_wrapper.get();
|
||||
CHECK(expected);
|
||||
|
||||
// The script source takes responsibility of free'ing |expected|.
|
||||
|
Loading…
Reference in New Issue
Block a user