diegoles / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

Using Eval in chrome extension #525

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

What steps will reproduce the problem?
1. In chrome app runtime, manifest_version=2.
1. Create a instance of goog.storage.Storage with htlm5 local storage 
memchanism.
2. Get the value in local sotrage use .get() method of sotrage instance.

What is the expected output? What do you see instead?
Throw "Storage: Invalid value was encountered" exception by goog.json.parse in 
the goog.storage.Storage.prototype.get function.

What version of the product are you using? On what operating system?
Chrome/23.0.1271.97
Windows 7 tested.

Please provide any additional information below.
This problem caused by the chrome app runtime disable the function eval. use 
JSON.pasre instead the eval function in this case it will works. I think in 
Abobe Air html runtime maybe have the same problem. 

Original issue reported on code.google.com by chon...@gmail.com on 27 Dec 2012 at 4:43

GoogleCodeExporter commented 8 years ago
This is fixed by setting goog.json.USE_NATIVE_JSON which is required for 
environments like Chrome Extensions.

Original comment by joelt...@google.com on 19 Aug 2015 at 8:35