http://codereview.chromium.org/6673011/diff/24002/src/extensions/experimental/collator.cc File src/extensions/experimental/collator.cc (right):
http://codereview.chromium.org/6673011/diff/24002/src/extensions/experimental/collator.cc#newcode73 src/extensions/experimental/collator.cc:73: bool *result) { bool * -> bool* http://codereview.chromium.org/6673011/diff/24002/src/extensions/experimental/collator.cc#newcode74 src/extensions/experimental/collator.cc:74: v8::Local<v8::Value> value = options->Get(v8::String::New(option)); I would guess that this can throw an exception? Can the user get hold of the option object? In that case, he could add something that throws an exception to it: option.__defineGetter__("my_option", function() { throw 42; }); I that case the value handle will be a null handle. Either you should have a TryCatch and check that there was no exception or you should check that the handle is not null. http://codereview.chromium.org/6673011/diff/24002/src/extensions/experimental/collator.cc#newcode84 src/extensions/experimental/collator.cc:84: // When there's an ICU error, delete |collator| and throw a JavaScript error Please add to this comment that no JavaScript wrapper has been created when this is called. I was initially worried that you would have a deleted pointer in an internal field. The side effect of deleting the collator here is sort of nasty. I would do that at the call sites or rename this function. http://codereview.chromium.org/6673011/diff/24002/src/extensions/experimental/collator.cc#newcode124 src/extensions/experimental/collator.cc:124: v8::String::New("Locale and collation options are required."))); Four-space indent. http://codereview.chromium.org/6673011/diff/24002/src/extensions/experimental/collator.cc#newcode134 src/extensions/experimental/collator.cc:134: if (U_FAILURE(status)) Please use braces for multi-line if. http://codereview.chromium.org/6673011/diff/24002/src/extensions/experimental/collator.cc#newcode152 src/extensions/experimental/collator.cc:152: if (U_FAILURE(status)) Braces. http://codereview.chromium.org/6673011/diff/24002/src/extensions/experimental/collator.cc#newcode158 src/extensions/experimental/collator.cc:158: if (!ignore_accents) Braces for these. http://codereview.chromium.org/6673011/diff/24002/src/extensions/experimental/collator.cc#newcode167 src/extensions/experimental/collator.cc:167: if (U_FAILURE(status)) Braces. http://codereview.chromium.org/6673011/diff/24002/src/extensions/experimental/collator.h File src/extensions/experimental/collator.h (right): http://codereview.chromium.org/6673011/diff/24002/src/extensions/experimental/collator.h#newcode49 src/extensions/experimental/collator.h:49: // Unpacks break iterator object from corresponding JavaScript object. break iterator -> collator http://codereview.chromium.org/6673011/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
