projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97250b5
)
Ignore invalid JSON object when converting NSDictionary
author
Cheng Zhao
<zcbenz@gmail.com>
Wed, 18 May 2016 05:50:12 +0000
(14:50 +0900)
committer
Cheng Zhao
<zcbenz@gmail.com>
Wed, 18 May 2016 05:54:37 +0000
(14:54 +0900)
atom/browser/mac/dict_util.mm
patch
|
blob
|
history
diff --git
a/atom/browser/mac/dict_util.mm
b/atom/browser/mac/dict_util.mm
index
04837eb
..
1889095
100644
(file)
--- a/
atom/browser/mac/dict_util.mm
+++ b/
atom/browser/mac/dict_util.mm
@@
-26,7
+26,7
@@
NSDictionary* DictionaryValueToNSDictionary(const base::DictionaryValue& value)
scoped_ptr<base::DictionaryValue> NSDictionaryToDictionaryValue(
NSDictionary* dict) {
- if (!dict)
+ if (!dict
|| ![NSJSONSerialization isValidJSONObject:dict]
)
return nullptr;
NSData* data = [NSJSONSerialization dataWithJSONObject:dict