Makes a big difference.
So, no, if you are not white Canada most likely won't care much unless some huge PR disaster.
[0]: http://www.canadalandshow.com/podcast/canada-failing-mohamed... [1]: https://en.wikipedia.org/wiki/Omar_Khadr
Khadr's case is tragic, but it's a bit disingenuous to claim his treatment was entirely on account of him being "brown". I'm pretty sure the fact he was fighting for the Taliban against his own country was part of the reason he wasn't properly advocated for.
There's also the case of two white men being beheaded by terrorists because the Canadian government refused to pay ransom. http://www.cnn.com/2016/06/13/asia/philippines-canada-abu-sa... Their race didn't seem to affect the position of the government, despite much publicity.
Edit:Clarity
I do not think that Canada is the only such country to find itself in said position. Only recently, Australia was unsuccessful in preventing the execution of some of its citizens, convicted of drug smuggling in Indonesia. Here [2] is a handy tool that visualizes the percentage of foreign prisoners in most countries around the world while [3] reports on the number of non-nationals facing death penalties mainly in Asia. Also came across these news reports on the many (100s) of Canadians that are in foreign prisons [4].
Question is, how exactly did they get to him so quickly after his arrival? Perhaps they de-anonymized his code [5]. Perhaps the State has a huge database of persons of interest [6]. And by the way, how did they figure out that it was his software that was getting used by porn site webmasters?
1. https://news.ycombinator.com/item?id=8976882
2. http://chartsbin.com/view/8ns
3. https://www.hri.global/files/2011/09/14/IHRA_DeathPenaltyRep...
4. https://www.thestar.com/news/canada/2013/10/27/over_1590_can... ; http://globalnews.ca/news/2542128/not-enough-being-done-to-h... ; http://o.canada.com/news/almost-2000-canadians-held-in-forei...
5. https://www.princeton.edu/~aylinc/papers/caliskan-islam_dean... ; https://www.youtube.com/watch?v=YMa04HovKfs
6. https://www.iranhumanrights.org/wp-content/uploads/Internet_... ; http://voiceproject.org/post_news/inside-irans-judicial-crac... ; https://news.ycombinator.com/item?id=12488420; https://opennet.net/sites/opennet.net/files/ONI_NameofGod_1_...