Skip to content

Commit

Permalink
Merge inbound to mozilla-central. a=merge
Browse files Browse the repository at this point in the history
  • Loading branch information
SV-ACiure committed Dec 17, 2018
2 parents 02c605c + c5dae90 commit 900aa00
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
4 changes: 4 additions & 0 deletions browser/app/profile/firefox.js
Expand Up @@ -1010,7 +1010,11 @@ pref("dom.ipc.plugins.sandbox-level.flash", 0);
// On windows these levels are:
// See - security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp
// SetSecurityLevelForContentProcess() for what the different settings mean.
#if defined(_ARM64_)
pref("security.sandbox.content.level", 0);
#else
pref("security.sandbox.content.level", 5);
#endif

// This controls the depth of stack trace that is logged when Windows sandbox
// logging is turned on. This is only currently available for the content
Expand Down
29 changes: 21 additions & 8 deletions js/src/wasm/WasmBaselineCompile.cpp
Expand Up @@ -2043,6 +2043,13 @@ class MachineStackTracker {
MOZ_ASSERT(numPtrs_ <= length());
return numPtrs_;
}

// Discard all contents, but (per mozilla::Vector::clear semantics) don't
// free or reallocate any dynamic storage associated with |vec_|.
void clear() {
vec_.clear();
numPtrs_ = 0;
}
};

// StackMapGenerator, which carries all state needed to create stack maps.
Expand Down Expand Up @@ -2097,6 +2104,11 @@ struct StackMapGenerator {
// BaseCompiler::stk_.
size_t memRefsOnStk_;

// This is a copy of mst_ that is used only within individual calls to
// createStackMap. It is here only to avoid possible heap allocation costs
// resulting from making it local to createStackMap().
MachineStackTracker augmentedMst_;

StackMapGenerator(StackMaps* stackMaps, const MachineState& trapExitLayout,
const size_t trapExitLayoutNumWords,
const MacroAssembler& masm)
Expand Down Expand Up @@ -2182,10 +2194,11 @@ struct StackMapGenerator {
}
#endif

// Start with the frame-setup map, and add operand-stack information
// to that.
MachineStackTracker augmentedMst;
if (!mst_.cloneTo(&augmentedMst)) {
// Start with the frame-setup map, and add operand-stack information to
// that. augmentedMst_ holds live data only within individual calls to
// createStackMap.
augmentedMst_.clear();
if (!mst_.cloneTo(&augmentedMst_)) {
return false;
}

Expand Down Expand Up @@ -2227,7 +2240,7 @@ struct StackMapGenerator {
uint32_t bodyPushedBytes =
framePushedExcludingArgs.value() - framePushedAtEntryToBody_.value();
MOZ_ASSERT(0 == bodyPushedBytes % sizeof(void*));
if (!augmentedMst.pushNonGCPointers(bodyPushedBytes / sizeof(void*))) {
if (!augmentedMst_.pushNonGCPointers(bodyPushedBytes / sizeof(void*))) {
return false;
}
}
Expand Down Expand Up @@ -2304,13 +2317,13 @@ struct StackMapGenerator {
MOZ_ASSERT(v.offs() <= framePushedExcludingArgs.value());
uint32_t offsFromMapLowest = framePushedExcludingArgs.value() - v.offs();
MOZ_ASSERT(0 == offsFromMapLowest % sizeof(void*));
augmentedMst.setGCPointer(offsFromMapLowest / sizeof(void*));
augmentedMst_.setGCPointer(offsFromMapLowest / sizeof(void*));
}

// Create the final StackMap. The initial map is zeroed out, so there's
// no need to write zero bits in it.
const uint32_t extraWords = extras.length();
const uint32_t augmentedMstWords = augmentedMst.length();
const uint32_t augmentedMstWords = augmentedMst_.length();
const uint32_t numMappedWords = extraWords + augmentedMstWords;
StackMap* stackMap = StackMap::create(numMappedWords);
if (!stackMap) {
Expand All @@ -2329,7 +2342,7 @@ struct StackMapGenerator {
}
// Followed by the "main" part of the map.
for (uint32_t i = 0; i < augmentedMstWords; i++) {
if (augmentedMst.isGCPointer(i)) {
if (augmentedMst_.isGCPointer(i)) {
stackMap->setBit(numMappedWords - 1 - i);
}
}
Expand Down
5 changes: 4 additions & 1 deletion testing/web-platform/mozilla/meta/__dir__.ini
@@ -1,3 +1,6 @@
lsan-allowed: [Init, nsHostResolver::ResolveHost]
leak-threshold:
[rdd:400]
if webrender: [tab:10000, geckomediaplugin:20000, default:16000]
if os == "mac": [tab:10000, geckomediaplugin:20000, default:2000, rdd:400]
[tab:10000, geckomediaplugin:20000, rdd:400]

0 comments on commit 900aa00

Please sign in to comment.