Reviewers: ulan,
Description:
Revert r12379 (Add checks to external string API).
[email protected]
BUG=
Please review this at https://chromiumcodereview.appspot.com/10897027/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M include/v8.h
M src/api.cc
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index
111f9cffd3655992b161fba4860e190d205c062d..83801265a0507f9994ec1b7b2f27ef8cf8959bdb
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);
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index
101361db0dab0248d7f7cc090e973cd8c49bf0db..65b544c7919eae9cb63119d7c0131b9be357ac73
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<int>(strlen(source))),
+ (source ? static_cast<int>(strlen(source)) : 0)),
source_(source, source_length_),
dep_count_(dep_count),
deps_(deps),
- auto_enable_(false) {
- CHECK(source);
-}
+ auto_enable_(false) { }
v8::Handle<Primitive> Undefined() {
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev