Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp

Issue 772743003: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007-2011 Google Inc. All rights reserved. 2 * Copyright (C) 2007-2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 return; 361 return;
362 } 362 }
363 363
364 ASSERT(isolate->InContext()); 364 ASSERT(isolate->InContext());
365 v8::TryCatch tryCatch; 365 v8::TryCatch tryCatch;
366 v8::Handle<v8::Value> result = V8ScriptRunner::compileAndRunInternalScript(e xpression, info.GetIsolate()); 366 v8::Handle<v8::Value> result = V8ScriptRunner::compileAndRunInternalScript(e xpression, info.GetIsolate());
367 367
368 v8::Local<v8::Object> wrappedResult = v8::Object::New(isolate); 368 v8::Local<v8::Object> wrappedResult = v8::Object::New(isolate);
369 if (tryCatch.HasCaught()) { 369 if (tryCatch.HasCaught()) {
370 wrappedResult->Set(v8::String::NewFromUtf8(isolate, "result"), tryCatch. Exception()); 370 wrappedResult->Set(v8::String::NewFromUtf8(isolate, "result"), tryCatch. Exception());
371 wrappedResult->Set(v8::String::NewFromUtf8(isolate, "exceptionDetails"), JavaScriptCallFrame::createExceptionDetails(tryCatch.Message(), isolate)); 371 wrappedResult->Set(v8::String::NewFromUtf8(isolate, "exceptionDetails"), JavaScriptCallFrame::createExceptionDetails(isolate, tryCatch.Message()));
372 } else { 372 } else {
373 wrappedResult->Set(v8::String::NewFromUtf8(isolate, "result"), result); 373 wrappedResult->Set(v8::String::NewFromUtf8(isolate, "result"), result);
374 wrappedResult->Set(v8::String::NewFromUtf8(isolate, "exceptionDetails"), v8::Undefined(isolate)); 374 wrappedResult->Set(v8::String::NewFromUtf8(isolate, "exceptionDetails"), v8::Undefined(isolate));
375 } 375 }
376 v8SetReturnValue(info, wrappedResult); 376 v8SetReturnValue(info, wrappedResult);
377 } 377 }
378 378
379 void V8InjectedScriptHost::setFunctionVariableValueMethodCustom(const v8::Functi onCallbackInfo<v8::Value>& info) 379 void V8InjectedScriptHost::setFunctionVariableValueMethodCustom(const v8::Functi onCallbackInfo<v8::Value>& info)
380 { 380 {
381 if (info.Length() < 4 || !info[0]->IsFunction() || !info[1]->IsInt32() || !i nfo[2]->IsString()) 381 if (info.Length() < 4 || !info[0]->IsFunction() || !info[1]->IsInt32() || !i nfo[2]->IsString())
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 void V8InjectedScriptHost::setNonEnumPropertyMethodCustom(const v8::FunctionCall backInfo<v8::Value>& info) 505 void V8InjectedScriptHost::setNonEnumPropertyMethodCustom(const v8::FunctionCall backInfo<v8::Value>& info)
506 { 506 {
507 if (info.Length() < 3 || !info[0]->IsObject() || !info[1]->IsString()) 507 if (info.Length() < 3 || !info[0]->IsObject() || !info[1]->IsString())
508 return; 508 return;
509 509
510 v8::Local<v8::Object> object = info[0]->ToObject(info.GetIsolate()); 510 v8::Local<v8::Object> object = info[0]->ToObject(info.GetIsolate());
511 object->ForceSet(info[1], info[2], v8::DontEnum); 511 object->ForceSet(info[1], info[2], v8::DontEnum);
512 } 512 }
513 513
514 } // namespace blink 514 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8DOMConfiguration.cpp ('k') | Source/bindings/templates/interface_base.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698