Title: [234152] branches/safari-606-branch/Source/_javascript_Core
- Revision
- 234152
- Author
- [email protected]
- Date
- 2018-07-24 10:23:34 -0700 (Tue, 24 Jul 2018)
Log Message
Cherry-pick r234106. rdar://problem/42545682
Add some asserts to help diagnose a crash.
https://bugs.webkit.org/show_bug.cgi?id=187915
<rdar://problem/42508166>
Reviewed by Michael Saboff.
Add some asserts to verify that an CodeBlock alternative should always have a
non-null jitCode. Also change a RELEASE_ASSERT_NOT_REACHED() in
CodeBlock::setOptimizationThresholdBasedOnCompilationResult() to a RELEASE_ASSERT()
so that we'll retain the state of the variables that failed the assertion (again
to help with diagnosis).
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::setAlternative):
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-606-branch/Source/_javascript_Core/ChangeLog (234151 => 234152)
--- branches/safari-606-branch/Source/_javascript_Core/ChangeLog 2018-07-24 17:16:57 UTC (rev 234151)
+++ branches/safari-606-branch/Source/_javascript_Core/ChangeLog 2018-07-24 17:23:34 UTC (rev 234152)
@@ -1,3 +1,49 @@
+2018-07-24 Babak Shafiei <[email protected]>
+
+ Cherry-pick r234106. rdar://problem/42545682
+
+ Add some asserts to help diagnose a crash.
+ https://bugs.webkit.org/show_bug.cgi?id=187915
+ <rdar://problem/42508166>
+
+ Reviewed by Michael Saboff.
+
+ Add some asserts to verify that an CodeBlock alternative should always have a
+ non-null jitCode. Also change a RELEASE_ASSERT_NOT_REACHED() in
+ CodeBlock::setOptimizationThresholdBasedOnCompilationResult() to a RELEASE_ASSERT()
+ so that we'll retain the state of the variables that failed the assertion (again
+ to help with diagnosis).
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::setAlternative):
+ (JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):
+ * dfg/DFGPlan.cpp:
+ (JSC::DFG::Plan::Plan):
+
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2018-07-23 Mark Lam <[email protected]>
+
+ Add some asserts to help diagnose a crash.
+ https://bugs.webkit.org/show_bug.cgi?id=187915
+ <rdar://problem/42508166>
+
+ Reviewed by Michael Saboff.
+
+ Add some asserts to verify that an CodeBlock alternative should always have a
+ non-null jitCode. Also change a RELEASE_ASSERT_NOT_REACHED() in
+ CodeBlock::setOptimizationThresholdBasedOnCompilationResult() to a RELEASE_ASSERT()
+ so that we'll retain the state of the variables that failed the assertion (again
+ to help with diagnosis).
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::setAlternative):
+ (JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):
+ * dfg/DFGPlan.cpp:
+ (JSC::DFG::Plan::Plan):
+
2018-07-23 Babak Shafiei <[email protected]>
Cherry-pick r234075. rdar://problem/42451525
Modified: branches/safari-606-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp (234151 => 234152)
--- branches/safari-606-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp 2018-07-24 17:16:57 UTC (rev 234151)
+++ branches/safari-606-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp 2018-07-24 17:23:34 UTC (rev 234152)
@@ -977,6 +977,8 @@
void CodeBlock::setAlternative(VM& vm, CodeBlock* alternative)
{
+ RELEASE_ASSERT(alternative);
+ RELEASE_ASSERT(alternative->jitCode());
m_alternative.set(vm, this, alternative);
}
@@ -2430,7 +2432,7 @@
JITCode::JITType type = jitType();
if (type != JITCode::BaselineJIT) {
dataLog(*this, ": expected to have baseline code but have ", type, "\n");
- RELEASE_ASSERT_NOT_REACHED();
+ CRASH_WITH_INFO(bitwise_cast<uintptr_t>(jitCode().get()), type);
}
CodeBlock* replacement = this->replacement();
Modified: branches/safari-606-branch/Source/_javascript_Core/dfg/DFGPlan.cpp (234151 => 234152)
--- branches/safari-606-branch/Source/_javascript_Core/dfg/DFGPlan.cpp 2018-07-24 17:16:57 UTC (rev 234151)
+++ branches/safari-606-branch/Source/_javascript_Core/dfg/DFGPlan.cpp 2018-07-24 17:23:34 UTC (rev 234152)
@@ -148,6 +148,7 @@
, weakReferences(codeBlock)
, stage(Preparing)
{
+ RELEASE_ASSERT(codeBlock->alternative()->jitCode());
}
Plan::~Plan()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes