From 4e2027bbc23251fbb4aae6e1664e790d06bfb6c6 Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Wed, 29 Aug 2012 15:23:48 +0000 Subject: [PATCH] Revert r12379 (Add checks to external string API). R=ulan@chromium.org BUG= Review URL: https://chromiumcodereview.appspot.com/10897027 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- include/v8.h | 2 +- src/api.cc | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/v8.h b/include/v8.h index 111f9cf..8380126 100644 --- a/include/v8.h +++ b/include/v8.h @@ -2539,7 +2539,7 @@ class V8EXPORT Extension { // NOLINT // Note that the strings passed into this constructor must live as long // as the Extension itself. Extension(const char* name, - const char* source, + const char* source = 0, int dep_count = 0, const char** deps = 0, int source_length = -1); diff --git a/src/api.cc b/src/api.cc index 101361d..65b544c 100644 --- a/src/api.cc +++ b/src/api.cc @@ -537,13 +537,11 @@ Extension::Extension(const char* name, : name_(name), source_length_(source_length >= 0 ? source_length : - static_cast(strlen(source))), + (source ? static_cast(strlen(source)) : 0)), source_(source, source_length_), dep_count_(dep_count), deps_(deps), - auto_enable_(false) { - CHECK(source); -} + auto_enable_(false) { } v8::Handle Undefined() { -- 2.7.4