Merge pull request #2416 from fredj/newer-closure-library

Upgrade closure-library version
This commit is contained in:
Frédéric Junod
2014-08-08 07:37:49 +02:00
6 changed files with 8 additions and 25 deletions

View File

@@ -236,6 +236,7 @@ def examples_star_json(name, match):
],
"define": [
"goog.dom.ASSUME_STANDARDS_MODE=true",
"goog.json.USE_NATIVE_JSON=true",
"goog.DEBUG=false"
],
"jscomp_error": [
@@ -254,6 +255,7 @@ def examples_star_json(name, match):
"duplicate",
"duplicateMessage",
"es3",
"es5Strict",
"externsValidation",
"fileoverviewTags",
"globalThis",
@@ -276,9 +278,6 @@ def examples_star_json(name, match):
"extra_annotation_name": [
"api", "observable"
],
"jscomp_off": [
"es5Strict"
],
"compilation_level": "ADVANCED",
"output_wrapper": "// OpenLayers 3. See http://ol3.js.org/\n(function(){%output%})();",
"use_types_for_optimization": True,

View File

@@ -18,6 +18,7 @@
],
"define": [
"goog.dom.ASSUME_STANDARDS_MODE=true",
"goog.json.USE_NATIVE_JSON=true",
"goog.DEBUG=false"
],
"jscomp_error": [
@@ -33,6 +34,7 @@
"deprecated",
"duplicateMessage",
"es3",
"es5Strict",
"externsValidation",
"fileoverviewTags",
"globalThis",
@@ -58,9 +60,6 @@
"extra_annotation_name": [
"api", "observable"
],
"jscomp_off": [
"es5Strict"
],
"compilation_level": "ADVANCED",
"output_wrapper": "// OpenLayers 3. See http://ol3.js.org/\n(function(){%output%})();",
"use_types_for_optimization": true,

View File

@@ -14,6 +14,7 @@
],
"define": [
"goog.dom.ASSUME_STANDARDS_MODE=true",
"goog.json.USE_NATIVE_JSON=true",
"goog.DEBUG=false"
],
"jscomp_error": [
@@ -29,6 +30,7 @@
"deprecated",
"duplicateMessage",
"es3",
"es5Strict",
"externsValidation",
"fileoverviewTags",
"globalThis",
@@ -54,9 +56,6 @@
"extra_annotation_name": [
"api", "observable"
],
"jscomp_off": [
"es5Strict"
],
"compilation_level": "ADVANCED",
"output_wrapper": "(function(){%output%})();",
"use_types_for_optimization": true,

View File

@@ -1,3 +1,3 @@
{
"library_url": "https://github.com/google/closure-library/archive/ab89cf45c216615d73a2f5dea720afb9d3415d1f.zip"
"library_url": "https://github.com/google/closure-library/archive/946a7d39d4ffe08676c755b21d901e71d9904a3b.zip"
}

View File

@@ -89,14 +89,6 @@ ol.BrowserFeature.HAS_DOM = ol.ENABLE_DOM;
ol.BrowserFeature.HAS_GEOLOCATION = 'geolocation' in goog.global.navigator;
/**
* @const
* @type {boolean}
*/
ol.BrowserFeature.HAS_JSON_PARSE =
'JSON' in goog.global && 'parse' in goog.global.JSON;
/**
* True if browser supports touch events.
* @const

View File

@@ -2,7 +2,6 @@ goog.provide('ol.format.JSONFeature');
goog.require('goog.asserts');
goog.require('goog.json');
goog.require('ol.BrowserFeature');
goog.require('ol.format.Feature');
goog.require('ol.format.FormatType');
@@ -32,12 +31,7 @@ ol.format.JSONFeature.prototype.getObject_ = function(source) {
if (goog.isObject(source)) {
return source;
} else if (goog.isString(source)) {
var object;
if (ol.BrowserFeature.HAS_JSON_PARSE) {
object = /** @type {Object} */ (JSON.parse(source));
} else {
object = goog.json.parse(source);
}
var object = goog.json.parse(source);
return goog.isDef(object) ? object : null;
} else {
goog.asserts.fail();