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

Unified Diff: chrome/renderer/resources/extensions/json_schema.js

Issue 11571014: Lazy load chrome.* APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more progress Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/json_schema.js
diff --git a/chrome/renderer/resources/extensions/json_schema.js b/chrome/renderer/resources/extensions/json_schema.js
index a0aa931f491cf517c4e34f13068111f8ed19d88d..89042ff0ec29f6df7135c5f3ffd5c76754f2f0ca 100644
--- a/chrome/renderer/resources/extensions/json_schema.js
+++ b/chrome/renderer/resources/extensions/json_schema.js
@@ -39,6 +39,10 @@
//==============================================================================
var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
not at google - send to devlin 2013/01/24 21:10:12 At some point it would be nice to make this file n
cduvall 2013/01/24 22:15:15 Put in TODO.
+var chrome = requireNative('chrome').GetChrome();
+var loadRefDependency = require('utils').loadRefDependency;
+
+var DCHECK = requireNative('logging').DCHECK;
function isInstanceOfClass(instance, className) {
if (!instance)
@@ -240,6 +244,7 @@ chromeHidden.JSONSchemaValidator.prototype.validate =
// If the schema has a $ref property, the instance must validate against
// that schema too. It must be present in this.types to be referenced.
if (schema["$ref"]) {
+ loadRefDependency(schema["$ref"]);
if (!this.types[schema["$ref"]])
this.addError(path, "unknownSchemaReference", [ schema["$ref"] ]);
else

Powered by Google App Engine
This is Rietveld 408576698