Commit 724f5648 authored by whesse@chromium.org's avatar whesse@chromium.org

Rewrites a ternary choice operator to fix a compiler

linkage bug.

Review URL: http://codereview.chromium.org/8189

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6941a4f3
......@@ -6789,6 +6789,4 @@ int BreakPointInfo::GetBreakPointCount() {
}
const int FunctionTemplateInfo::kSize;
const int ObjectTemplateInfo::kSize;
} } // namespace v8::internal
......@@ -327,8 +327,11 @@ static Object* Runtime_GetTemplateField(Arguments args) {
RUNTIME_ASSERT(type == FUNCTION_TEMPLATE_INFO_TYPE ||
type == OBJECT_TEMPLATE_INFO_TYPE);
RUNTIME_ASSERT(offset > 0);
RUNTIME_ASSERT(offset < ((type == FUNCTION_TEMPLATE_INFO_TYPE) ?
FunctionTemplateInfo::kSize : ObjectTemplateInfo::kSize));
if (type == FUNCTION_TEMPLATE_INFO_TYPE) {
RUNTIME_ASSERT(offset < FunctionTemplateInfo::kSize);
} else {
RUNTIME_ASSERT(offset < ObjectTemplateInfo::kSize);
}
return HeapObject::RawField(templ, offset);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment