Add defensive code in pickle to preclude realloc of shared header_ memory.
Add defensive code in pickle to preclude realloc of shared header_ memory.

Since I was able to (some how) generate a problem with header_ being
double freed (perhaps, because it was shared in some way??), this change
adds several lines of defensive coding.  The current assignment operator
appears very dangerous, as it allowed Resize to be called when the header_
was not owned by the instance (it was read-only).  I haven't found a path
to cause a problem, but we may as well be defensive.

BUG=17027
BUG=17088
r=CPU
Review URL: http://codereview.chromium.org/160490

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@22261 0039d316-1c4b-4281-b951-d872f2087c98

TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,hujiajie/pa-chromium,hgl888/chromium-crosswalk,dednal/chromium.src,rogerwang/chromium,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,dednal/chromium.src,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,timopulkkinen/BubbleFish,M4sse/chromium.src,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,robclark/chromium,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,Jonekee/chromium.src,dednal/chromium.src,M4sse/chromium.src,hujiajie/pa-chromium,ChromiumWebApps/chromium,robclark/chromium,Chilledheart/chromium,anirudhSK/chromium,Chilledheart/chromium,ChromiumWebApps/chromium,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,keishi/chromium,mogoweb/chromium-crosswalk,patrickm/chromium.src,rogerwang/chromium,hujiajie/pa-chromium,hujiajie/pa-chromium,jaruba/chromium.src,timopulkkinen/BubbleFish,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,robclark/chromium,anirudhSK/chromium,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,Just-D/chromium-1,anirudhSK/chromium,ChromiumWebApps/chromium,ltilve/chromium,Just-D/chromium-1,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,mogoweb/chromium-crosswalk,ltilve/chromium,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,anirudhSK/chromium,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,nacl-webkit/chrome_deps,dushu1203/chromium.src,Just-D/chromium-1,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,axinging/chromium-crosswalk,axinging/chromium-crosswalk,M4sse/chromium.src,robclark/chromium,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,hujiajie/pa-chromium,keishi/chromium,Jonekee/chromium.src,jaruba/chromium.src,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,Chilledheart/chromium,hujiajie/pa-chromium,Jonekee/chromium.src,rogerwang/chromium,keishi/chromium,fujunwei/chromium-crosswalk,jaruba/chromium.src,robclark/chromium,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,anirudhSK/chromium,timopulkkinen/BubbleFish,littlstar/chromium.src,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,patrickm/chromium.src,patrickm/chromium.src,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,keishi/chromium,chuan9/chromium-crosswalk,dednal/chromium.src,mogoweb/chromium-crosswalk,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,robclark/chromium,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,patrickm/chromium.src,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,rogerwang/chromium,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,robclark/chromium,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,littlstar/chromium.src,dednal/chromium.src,nacl-webkit/chrome_deps,keishi/chromium,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,ltilve/chromium,ltilve/chromium,chuan9/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,rogerwang/chromium,keishi/chromium,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,keishi/chromium,jaruba/chromium.src,robclark/chromium,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,patrickm/chromium.src,timopulkkinen/BubbleFish,ondra-novak/chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,Jonekee/chromium.src,robclark/chromium,krieger-od/nwjs_chromium.src,Just-D/chromium-1,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,hujiajie/pa-chromium,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,ltilve/chromium,littlstar/chromium.src,rogerwang/chromium,keishi/chromium,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,mogoweb/chromium-crosswalk,littlstar/chromium.src,zcbenz/cefode-chromium,markYoungH/chromium.src,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,jaruba/chromium.src,hgl888/chromium-crosswalk,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,rogerwang/chromium,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,littlstar/chromium.src,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,ondra-novak/chromium.src,hgl888/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,ondra-novak/chromium.src,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,keishi/chromium,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,keishi/chromium,junmin-zhu/chromium-rivertrail,axinging/chromium-crosswalk,rogerwang/chromium,littlstar/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,rogerwang/chromium,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,ltilve/chromium,keishi/chromium,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,patrickm/chromium.src,Just-D/chromium-1,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,patrickm/chromium.src,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,rogerwang/chromium,ltilve/chromium,chuan9/chromium-crosswalk,ltilve/chromium,M4sse/chromium.src,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,markYoungH/chromium.src,robclark/chromium,littlstar/chromium.src,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,markYoungH/chromium.src,ltilve/chromium,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,markYoungH/chromium.src