зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1252713 - Fix FILES_PER_UNIFIED_FILE=1 bustage in js/. r=terrence
--HG-- extra : rebase_source : 9a57b0c1ed834adb4c3883c25052738481fc292c
This commit is contained in:
Родитель
573869a701
Коммит
402e48074d
|
@ -10,6 +10,8 @@
|
|||
#define gc_Policy_h
|
||||
|
||||
#include "mozilla/TypeTraits.h"
|
||||
#include "gc/Barrier.h"
|
||||
#include "gc/Marking.h"
|
||||
#include "js/GCPolicyAPI.h"
|
||||
|
||||
// Forward declare the types we're defining policies for. This file is
|
||||
|
@ -17,6 +19,7 @@
|
|||
// will be available when we do template expansion, allowing for use of
|
||||
// static members in the underlying types. We cannot, however, use
|
||||
// static_assert to verify relations between types.
|
||||
class JSLinearString;
|
||||
namespace js {
|
||||
class AccessorShape;
|
||||
class ArgumentsObject;
|
||||
|
|
|
@ -13,24 +13,24 @@ BEGIN_TEST(testForceLexicalInitialization)
|
|||
{
|
||||
// Attach an uninitialized lexical to a scope and ensure that it's
|
||||
// set to undefined
|
||||
RootedGlobalObject g(cx, cx->global());
|
||||
Rooted<ClonedBlockObject*> scope(cx, ClonedBlockObject::createGlobal(cx, g));
|
||||
js::RootedGlobalObject g(cx, cx->global());
|
||||
JS::Rooted<js::ClonedBlockObject*> scope(cx, js::ClonedBlockObject::createGlobal(cx, g));
|
||||
|
||||
RootedValue uninitialized(cx, MagicValue(JS_UNINITIALIZED_LEXICAL));
|
||||
RootedPropertyName name(cx, Atomize(cx, "foopi", 4)->asPropertyName());
|
||||
RootedId id(cx, NameToId(name));
|
||||
JS::RootedValue uninitialized(cx, JS::MagicValue(JS_UNINITIALIZED_LEXICAL));
|
||||
js::RootedPropertyName name(cx, Atomize(cx, "foopi", 4)->asPropertyName());
|
||||
JS::RootedId id(cx, NameToId(name));
|
||||
unsigned attrs = JSPROP_ENUMERATE | JSPROP_PERMANENT;
|
||||
|
||||
NativeDefineProperty(cx, scope, id, uninitialized, nullptr, nullptr, attrs);
|
||||
|
||||
// Verify that "foopi" is uninitialized
|
||||
const Value v = scope->getSlot(scope->lookup(cx, id)->slot());
|
||||
const JS::Value v = scope->getSlot(scope->lookup(cx, id)->slot());
|
||||
CHECK(v.isMagic(JS_UNINITIALIZED_LEXICAL));
|
||||
|
||||
ForceLexicalInitialization(cx, scope);
|
||||
|
||||
// Verify that "foopi" has been initialized to undefined
|
||||
const Value v2 = scope->getSlot(scope->lookup(cx, id)->slot());
|
||||
const JS::Value v2 = scope->getSlot(scope->lookup(cx, id)->slot());
|
||||
CHECK(v2.isUndefined());
|
||||
|
||||
return true;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "jsapi-tests/tests.h"
|
||||
|
||||
static bool WriteValidBytes(wasm::Encoder& encoder, bool* passed)
|
||||
static bool WriteValidBytes(js::wasm::Encoder& encoder, bool* passed)
|
||||
{
|
||||
*passed = false;
|
||||
if (!encoder.empty())
|
||||
|
@ -40,6 +40,7 @@ static bool WriteValidBytes(wasm::Encoder& encoder, bool* passed)
|
|||
|
||||
BEGIN_TEST(testWasmLEB128_encoding)
|
||||
{
|
||||
using namespace js;
|
||||
using namespace wasm;
|
||||
|
||||
Bytecode bc;
|
||||
|
@ -69,6 +70,7 @@ END_TEST(testWasmLEB128_encoding)
|
|||
|
||||
BEGIN_TEST(testWasmLEB128_valid_decoding)
|
||||
{
|
||||
using namespace js;
|
||||
using namespace wasm;
|
||||
|
||||
Bytecode bc;
|
||||
|
@ -119,6 +121,7 @@ END_TEST(testWasmLEB128_valid_decoding)
|
|||
|
||||
BEGIN_TEST(testWasmLEB128_invalid_decoding)
|
||||
{
|
||||
using namespace js;
|
||||
using namespace wasm;
|
||||
|
||||
Bytecode bc;
|
||||
|
|
|
@ -130,7 +130,7 @@ BEGIN_TEST(testXDR_sourceMap)
|
|||
CHECK(script);
|
||||
|
||||
size_t len = strlen(*sm);
|
||||
UniqueTwoByteChars expected_wrapper(js::InflateString(cx, *sm, &len));
|
||||
JS::UniqueTwoByteChars expected_wrapper(js::InflateString(cx, *sm, &len));
|
||||
char16_t *expected = expected_wrapper.get();
|
||||
CHECK(expected);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче