mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Bug 1485347 - Part 2: Remove CheckScriptDataIntegrity. r=jandem
This diagnostic did not provide value and should be removed to allow further cleanup. MozReview-Commit-ID: 49XJM0G7NAP
This commit is contained in:
parent
d02091f27c
commit
d5ae417328
@ -75,21 +75,6 @@ using mozilla::Maybe;
|
||||
using mozilla::PodCopy;
|
||||
|
||||
|
||||
// Check that JSScript::data hasn't experienced obvious memory corruption.
|
||||
// This is a diagnositic for Bug 1367896.
|
||||
static void
|
||||
CheckScriptDataIntegrity(JSScript* script)
|
||||
{
|
||||
ScopeArray* sa = script->scopes();
|
||||
uint8_t* ptr = reinterpret_cast<uint8_t*>(sa->vector);
|
||||
|
||||
// Check that scope data - who's pointer is stored in data region - also
|
||||
// points within the data region.
|
||||
MOZ_RELEASE_ASSERT(ptr >= script->data &&
|
||||
ptr + sa->length <= script->data + script->dataSize(),
|
||||
"Corrupt JSScript::data");
|
||||
}
|
||||
|
||||
template<XDRMode mode>
|
||||
XDRResult
|
||||
js::XDRScriptConst(XDRState<mode>* xdr, MutableHandleValue vp)
|
||||
@ -370,8 +355,6 @@ js::XDRScript(XDRState<mode>* xdr, HandleScope scriptEnclosingScope,
|
||||
script = scriptp.get();
|
||||
MOZ_ASSERT(script->functionNonDelazifying() == fun);
|
||||
|
||||
CheckScriptDataIntegrity(script);
|
||||
|
||||
if (!fun && script->treatAsRunOnce() && script->hasRunOnce()) {
|
||||
// This is a toplevel or eval script that's runOnce. We want to
|
||||
// make sure that we're not XDR-saving an object we emitted for
|
||||
@ -890,8 +873,6 @@ js::XDRScript(XDRState<mode>* xdr, HandleScope scriptEnclosingScope,
|
||||
}
|
||||
|
||||
if (mode == XDR_DECODE) {
|
||||
CheckScriptDataIntegrity(script);
|
||||
|
||||
scriptp.set(script);
|
||||
|
||||
/* see BytecodeEmitter::tellDebuggerAboutCompiledScript */
|
||||
@ -3458,8 +3439,6 @@ js::detail::CopyScript(JSContext* cx, HandleScript src, HandleScript dst,
|
||||
|
||||
/* NB: Keep this in sync with XDRScript. */
|
||||
|
||||
CheckScriptDataIntegrity(src);
|
||||
|
||||
/* Some embeddings are not careful to use ExposeObjectToActiveJS as needed. */
|
||||
MOZ_ASSERT(!src->sourceObject()->isMarkedGray());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user