Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: Source/bindings/core/v8/V8Binding.h

Issue 1032053003: bindings: Add assersion in v8AtomicString (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8Binding.h
diff --git a/Source/bindings/core/v8/V8Binding.h b/Source/bindings/core/v8/V8Binding.h
index c71b05f6920efc9bb12039a9f7348fd6f3cd3352..f07da9d7e794fffcf89aba0cb89f7caa7e84ec01 100644
--- a/Source/bindings/core/v8/V8Binding.h
+++ b/Source/bindings/core/v8/V8Binding.h
@@ -354,6 +354,9 @@ inline v8::Handle<v8::String> v8AtomicString(v8::Isolate* isolate, const char* s
v8::Local<v8::String> value;
if (LIKELY(v8::String::NewFromUtf8(isolate, str, v8::NewStringType::kInternalized, length).ToLocal(&value)))
return value;
+ // Immediately crashes when NewFromUtf8() fails because it only fails the
+ // given str is too long.
+ RELEASE_ASSERT_NOT_REACHED();
return v8::String::Empty(isolate);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698