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

Side by Side Diff: extensions/renderer/resources/binding.js

Issue 1914643003: [Extensions] Update last_error.js, send_request.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var Event = require('event_bindings').Event; 5 var Event = require('event_bindings').Event;
6 var forEach = require('utils').forEach; 6 var forEach = require('utils').forEach;
7 // Note: Beware sneaky getters/setters when using GetAvailbility(). Use safe/raw 7 // Note: Beware sneaky getters/setters when using GetAvailbility(). Use safe/raw
8 // variables as arguments. 8 // variables as arguments.
9 var GetAvailability = requireNative('v8_context').GetAvailability; 9 var GetAvailability = requireNative('v8_context').GetAvailability;
10 var exceptionHandler = require('uncaught_exception_handler'); 10 var exceptionHandler = require('uncaught_exception_handler');
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 args); 432 args);
433 } 433 }
434 434
435 sendRequestHandler.clearCalledSendRequest(); 435 sendRequestHandler.clearCalledSendRequest();
436 436
437 var retval; 437 var retval;
438 if (this.handleRequest) { 438 if (this.handleRequest) {
439 retval = $Function.apply(this.handleRequest, this, args); 439 retval = $Function.apply(this.handleRequest, this, args);
440 } else { 440 } else {
441 var optArgs = { 441 var optArgs = {
442 __proto__: null,
442 customCallback: this.customCallback 443 customCallback: this.customCallback
443 }; 444 };
444 retval = sendRequest(this.name, args, 445 retval = sendRequest(this.name, args,
445 this.definition.parameters, 446 this.definition.parameters,
446 optArgs); 447 optArgs);
447 } 448 }
448 sendRequestHandler.clearCalledSendRequest(); 449 sendRequestHandler.clearCalledSendRequest();
449 450
450 // Validate return value if in sanity check mode. 451 // Validate return value if in sanity check mode.
451 if (logging.DCHECK_IS_ON() && this.definition.returns) 452 if (logging.DCHECK_IS_ON() && this.definition.returns)
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 availability.message); 583 availability.message);
583 return; 584 return;
584 } 585 }
585 586
586 this.runHooks_(mod, schema); 587 this.runHooks_(mod, schema);
587 return mod; 588 return mod;
588 } 589 }
589 }; 590 };
590 591
591 exports.$set('Binding', Binding); 592 exports.$set('Binding', Binding);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698