[inspector] fix compilation on win and linux
BUG=chromium:635948 R=dgozman@chromium.org,machenbach@chromium.org Review-Url: https://codereview.chromium.org/2389133004 Cr-Commit-Position: refs/heads/master@{#40003}
This commit is contained in:
parent
7e237ad3c8
commit
186e7db8dd
@ -375,7 +375,7 @@ String16 String16::fromInteger(int number) {
|
||||
String16 String16::fromInteger(size_t number) {
|
||||
const size_t kBufferSize = 50;
|
||||
char buffer[kBufferSize];
|
||||
std::snprintf(buffer, kBufferSize, "%zu", number);
|
||||
v8::base::OS::SNPrintF(buffer, kBufferSize, "%zu", number);
|
||||
return String16(buffer);
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,6 @@ class SetTimeoutExtension : public v8::Extension {
|
||||
|
||||
private:
|
||||
static void SetTimeout(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
v8::Isolate* isolate = args.GetIsolate();
|
||||
if (args.Length() != 2 || !args[1]->IsNumber() ||
|
||||
(!args[0]->IsFunction() && !args[0]->IsString()) ||
|
||||
args[1].As<v8::Number>()->Value() != 0.0) {
|
||||
|
@ -132,7 +132,7 @@ void ExecuteStringTask::Run(v8::Isolate* isolate,
|
||||
v8::Local<v8::String> source =
|
||||
v8::String::NewFromTwoByte(isolate, expression_.characters16(),
|
||||
v8::NewStringType::kNormal,
|
||||
expression_.length())
|
||||
static_cast<int>(expression_.length()))
|
||||
.ToLocalChecked();
|
||||
|
||||
v8::ScriptCompiler::Source scriptSource(source, origin);
|
||||
|
Loading…
Reference in New Issue
Block a user