Revision: 12379 Author: [email protected] Date: Fri Aug 24 06:01:52 2012 Log: Add check to external string resource.
Extensions are a source of external strings where we don't perform check yet.
[email protected] BUG= Review URL: https://chromiumcodereview.appspot.com/10878025 http://code.google.com/p/v8/source/detail?r=12379 Modified: /branches/bleeding_edge/include/v8.h /branches/bleeding_edge/src/api.cc ======================================= --- /branches/bleeding_edge/include/v8.h Fri Aug 17 03:43:32 2012 +++ /branches/bleeding_edge/include/v8.h Fri Aug 24 06:01:52 2012 @@ -2539,7 +2539,7 @@ // Note that the strings passed into this constructor must live as long // as the Extension itself. Extension(const char* name, - const char* source = 0, + const char* source, int dep_count = 0, const char** deps = 0, int source_length = -1); ======================================= --- /branches/bleeding_edge/src/api.cc Mon Aug 20 07:32:32 2012 +++ /branches/bleeding_edge/src/api.cc Fri Aug 24 06:01:52 2012 @@ -537,11 +537,13 @@ : name_(name), source_length_(source_length >= 0 ? source_length : - (source ? static_cast<int>(strlen(source)) : 0)), + static_cast<int>(strlen(source))), source_(source, source_length_), dep_count_(dep_count), deps_(deps), - auto_enable_(false) { } + auto_enable_(false) { + CHECK(source); +} v8::Handle<Primitive> Undefined() { -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
