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

Side by Side Diff: Source/bindings/core/v8/ScriptController.cpp

Issue 683003002: 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, 1 month 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
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8DOMConfiguration.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 267 }
268 268
269 // Create a V8 object with an interceptor of NPObjectPropertyGetter. 269 // Create a V8 object with an interceptor of NPObjectPropertyGetter.
270 void ScriptController::bindToWindowObject(LocalFrame* frame, const String& key, NPObject* object) 270 void ScriptController::bindToWindowObject(LocalFrame* frame, const String& key, NPObject* object)
271 { 271 {
272 ScriptState* scriptState = ScriptState::forMainWorld(frame); 272 ScriptState* scriptState = ScriptState::forMainWorld(frame);
273 if (!scriptState->contextIsValid()) 273 if (!scriptState->contextIsValid())
274 return; 274 return;
275 275
276 ScriptState::Scope scope(scriptState); 276 ScriptState::Scope scope(scriptState);
277 v8::Handle<v8::Object> value = createV8ObjectForNPObject(object, 0, m_isolat e); 277 v8::Handle<v8::Object> value = createV8ObjectForNPObject(m_isolate, object, 0);
278 278
279 // Attach to the global object. 279 // Attach to the global object.
280 scriptState->context()->Global()->Set(v8String(m_isolate, key), value); 280 scriptState->context()->Global()->Set(v8String(m_isolate, key), value);
281 } 281 }
282 282
283 void ScriptController::enableEval() 283 void ScriptController::enableEval()
284 { 284 {
285 if (!m_windowProxy->isContextInitialized()) 285 if (!m_windowProxy->isContextInitialized())
286 return; 286 return;
287 v8::HandleScope handleScope(m_isolate); 287 v8::HandleScope handleScope(m_isolate);
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 resultArray->Set(i, evaluationResult); 644 resultArray->Set(i, evaluationResult);
645 } 645 }
646 646
647 if (results) { 647 if (results) {
648 for (size_t i = 0; i < resultArray->Length(); ++i) 648 for (size_t i = 0; i < resultArray->Length(); ++i)
649 results->append(handleScope.Escape(resultArray->Get(i))); 649 results->append(handleScope.Escape(resultArray->Get(i)));
650 } 650 }
651 } 651 }
652 652
653 } // namespace blink 653 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8DOMConfiguration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698