Displaying a graphic layer derived from an arcgis server geoprocessing task on a webapp map

I know this should be basic… but I am trying to get an ouput from a arcgis server geoprocessing task of data type "GPFeatureRecordSetLayer" to be added into a map on a webapp. here is the code (the " in the http is to break the link):


as far as I can tell it gets the results fine but for whatever reason the map.graphic.add(feature); line crashes the code.

the onTaskSuccess function is modeled after a tutorial found here: