Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2617)

Unified Diff: src/pkg/runtime/hashmap.goc

Issue 95560046: code review 95560046: reflect: don't panic on delete from nil map. (Closed)
Patch Set: diff -r eabf83a5e11c https://khr%40golang.org@code.google.com/p/go/ Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/reflect/all_test.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/runtime/hashmap.goc
===================================================================
--- a/src/pkg/runtime/hashmap.goc
+++ b/src/pkg/runtime/hashmap.goc
@@ -990,7 +990,7 @@
#pragma textflag NOSPLIT
func reflect·mapdelete(t *MapType, h *Hmap, key *byte) {
if(h == nil)
- runtime·panicstring("delete from nil map");
+ return; // see bug 8051
if(raceenabled) {
runtime·racewritepc(h, runtime·getcallerpc(&t), reflect·mapdelete);
runtime·racereadobjectpc(key, t->key, runtime·getcallerpc(&t), reflect·mapdelete);
« no previous file with comments | « src/pkg/reflect/all_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b